From a60c6315518d14bb533d9417be5caf76b33b40bc Mon Sep 17 00:00:00 2001 From: Aleksander Cynarski Date: Sat, 28 Nov 2020 18:59:17 +0100 Subject: [PATCH] Initial commit. --- .gitignore | 64 + .swagger-codegen-ignore | 23 + .swagger-codegen/VERSION | 1 + .travis.yml | 14 + README.md | 518 + docs/APIError.md | 11 + docs/AccessToken.md | 10 + docs/AddCollaboratorOption.md | 10 + docs/AddTimeOption.md | 12 + docs/AdminApi.md | 713 ++ docs/AnnotatedTag.md | 16 + docs/AnnotatedTagObject.md | 12 + docs/Attachment.md | 16 + docs/Branch.md | 18 + docs/BranchProtection.md | 31 + docs/Comment.md | 19 + docs/Commit.md | 16 + docs/CommitDateOptions.md | 11 + docs/CommitMeta.md | 11 + docs/CommitUser.md | 12 + docs/ContentsResponse.md | 23 + docs/CreateBranchProtectionOption.md | 29 + docs/CreateEmailOption.md | 10 + docs/CreateFileOptions.md | 16 + docs/CreateForkOption.md | 10 + docs/CreateGPGKeyOption.md | 10 + docs/CreateHookOption.md | 14 + docs/CreateHookOptionConfig.md | 9 + docs/CreateIssueCommentOption.md | 10 + docs/CreateIssueOption.md | 17 + docs/CreateKeyOption.md | 12 + docs/CreateLabelOption.md | 12 + docs/CreateMilestoneOption.md | 12 + docs/CreateOAuth2ApplicationOptions.md | 11 + docs/CreateOrgOption.md | 16 + docs/CreatePullRequestOption.md | 18 + docs/CreatePullReviewComment.md | 13 + docs/CreatePullReviewOptions.md | 13 + docs/CreateReleaseOption.md | 15 + docs/CreateRepoOption.md | 18 + docs/CreateStatusOption.md | 13 + docs/CreateTeamOption.md | 15 + docs/CreateUserOption.md | 17 + docs/DeleteEmailOption.md | 10 + docs/DeleteFileOptions.md | 16 + docs/DeployKey.md | 18 + docs/EditAttachmentOptions.md | 10 + docs/EditBranchProtectionOption.md | 28 + docs/EditDeadlineOption.md | 10 + docs/EditGitHookOption.md | 10 + docs/EditHookOption.md | 13 + docs/EditIssueCommentOption.md | 10 + docs/EditIssueOption.md | 17 + docs/EditLabelOption.md | 12 + docs/EditMilestoneOption.md | 13 + docs/EditOrgOption.md | 15 + docs/EditPullRequestOption.md | 19 + docs/EditReactionOption.md | 10 + docs/EditReleaseOption.md | 15 + docs/EditRepoOption.md | 27 + docs/EditTeamOption.md | 15 + docs/EditUserOption.md | 24 + docs/Email.md | 12 + docs/ExternalTracker.md | 12 + docs/ExternalWiki.md | 10 + docs/FileCommitResponse.md | 17 + docs/FileDeleteResponse.md | 12 + docs/FileLinksResponse.md | 12 + docs/FileResponse.md | 12 + docs/GPGKey.md | 21 + docs/GPGKeyEmail.md | 11 + docs/GitBlobResponse.md | 14 + docs/GitEntry.md | 15 + docs/GitHook.md | 12 + docs/GitObject.md | 12 + docs/GitTreeResponse.md | 15 + docs/Hook.md | 16 + docs/Identity.md | 11 + docs/InlineResponse200.md | 11 + docs/InlineResponse2001.md | 11 + docs/InternalTracker.md | 12 + docs/Issue.md | 30 + docs/IssueApi.md | 3809 ++++++ docs/IssueDeadline.md | 10 + docs/IssueLabelsOption.md | 10 + docs/Label.md | 14 + docs/MarkdownOption.md | 13 + docs/MergePullRequestOption.md | 13 + docs/MigrateRepoForm.md | 23 + docs/Milestone.md | 17 + docs/MiscellaneousApi.md | 308 + docs/NotificationApi.md | 582 + docs/NotificationCount.md | 10 + docs/NotificationSubject.md | 13 + docs/NotificationThread.md | 16 + docs/OAuth2Application.md | 15 + docs/Organization.md | 18 + docs/OrganizationApi.md | 3179 +++++ docs/PRBranchInfo.md | 14 + docs/PayloadCommit.md | 19 + docs/PayloadCommitVerification.md | 14 + docs/PayloadUser.md | 12 + docs/Permission.md | 12 + docs/PublicKey.md | 18 + docs/PullRequest.md | 36 + docs/PullRequestMeta.md | 11 + docs/PullReview.md | 20 + docs/PullReviewComment.md | 23 + docs/Reaction.md | 12 + docs/Reference.md | 12 + docs/Release.md | 24 + docs/RepoCommit.md | 14 + docs/RepoTopicOptions.md | 10 + docs/Repository.md | 49 + docs/RepositoryApi.md | 7462 +++++++++++ docs/RepositoryMeta.md | 13 + docs/ReviewStateType.md | 9 + docs/SearchResults.md | 11 + docs/ServerVersion.md | 10 + docs/StateType.md | 9 + docs/Status.md | 18 + docs/StatusState.md | 9 + docs/StopWatch.md | 11 + docs/SubmitPullReviewOptions.md | 11 + docs/Tag.md | 14 + docs/Team.md | 17 + docs/TimeStamp.md | 9 + docs/TopicName.md | 10 + docs/TopicResponse.md | 14 + docs/TrackedTime.md | 16 + docs/TransferRepoOption.md | 11 + docs/UpdateFileOptions.md | 18 + docs/User.md | 18 + docs/UserApi.md | 3607 ++++++ docs/UserHeatmapData.md | 11 + docs/WatchInfo.md | 15 + git_push.sh | 52 + giteapython/__init__.py | 154 + giteapython/api/__init__.py | 12 + giteapython/api/admin_api.py | 935 ++ giteapython/api/issue_api.py | 5396 ++++++++ giteapython/api/miscellaneous_api.py | 402 + giteapython/api/notification_api.py | 793 ++ giteapython/api/organization_api.py | 4192 +++++++ giteapython/api/repository_api.py | 10402 ++++++++++++++++ giteapython/api/user_api.py | 4592 +++++++ giteapython/api_client.py | 638 + giteapython/configuration.py | 287 + giteapython/models/__init__.py | 141 + giteapython/models/access_token.py | 116 + giteapython/models/add_collaborator_option.py | 115 + giteapython/models/add_time_option.py | 172 + giteapython/models/annotated_tag.py | 271 + giteapython/models/annotated_tag_object.py | 167 + giteapython/models/api_error.py | 141 + giteapython/models/attachment.py | 271 + giteapython/models/branch.py | 323 + giteapython/models/branch_protection.py | 661 + giteapython/models/comment.py | 349 + giteapython/models/commit.py | 271 + giteapython/models/commit_date_options.py | 141 + giteapython/models/commit_meta.py | 141 + giteapython/models/commit_user.py | 167 + giteapython/models/contents_response.py | 463 + .../models/create_branch_protection_option.py | 609 + giteapython/models/create_email_option.py | 117 + giteapython/models/create_file_options.py | 280 + giteapython/models/create_fork_option.py | 117 + giteapython/models/create_gpg_key_option.py | 118 + giteapython/models/create_hook_option.py | 227 + .../models/create_hook_option_config.py | 87 + .../models/create_issue_comment_option.py | 116 + giteapython/models/create_issue_option.py | 304 + giteapython/models/create_key_option.py | 175 + giteapython/models/create_label_option.py | 169 + giteapython/models/create_milestone_option.py | 167 + .../create_o_auth2_application_options.py | 141 + giteapython/models/create_org_option.py | 280 + .../models/create_pull_request_option.py | 323 + .../models/create_pull_review_comment.py | 199 + .../models/create_pull_review_options.py | 193 + giteapython/models/create_release_option.py | 246 + giteapython/models/create_repo_option.py | 342 + giteapython/models/create_status_option.py | 193 + giteapython/models/create_team_option.py | 252 + giteapython/models/create_user_option.py | 300 + giteapython/models/delete_email_option.py | 117 + giteapython/models/delete_file_options.py | 280 + giteapython/models/deploy_key.py | 323 + giteapython/models/edit_attachment_options.py | 115 + .../models/edit_branch_protection_option.py | 583 + giteapython/models/edit_deadline_option.py | 116 + giteapython/models/edit_git_hook_option.py | 115 + giteapython/models/edit_hook_option.py | 193 + .../models/edit_issue_comment_option.py | 116 + giteapython/models/edit_issue_option.py | 297 + giteapython/models/edit_label_option.py | 167 + giteapython/models/edit_milestone_option.py | 193 + giteapython/models/edit_org_option.py | 253 + .../models/edit_pull_request_option.py | 349 + giteapython/models/edit_reaction_option.py | 115 + giteapython/models/edit_release_option.py | 245 + giteapython/models/edit_repo_option.py | 587 + giteapython/models/edit_team_option.py | 252 + giteapython/models/edit_user_option.py | 480 + giteapython/models/email.py | 167 + giteapython/models/external_tracker.py | 173 + giteapython/models/external_wiki.py | 117 + giteapython/models/file_commit_response.py | 297 + giteapython/models/file_delete_response.py | 167 + giteapython/models/file_links_response.py | 167 + giteapython/models/file_response.py | 167 + giteapython/models/git_blob_response.py | 219 + giteapython/models/git_entry.py | 245 + giteapython/models/git_hook.py | 167 + giteapython/models/git_object.py | 167 + giteapython/models/git_tree_response.py | 245 + giteapython/models/gpg_key.py | 401 + giteapython/models/gpg_key_email.py | 141 + giteapython/models/hook.py | 271 + giteapython/models/identity.py | 141 + giteapython/models/inline_response200.py | 141 + giteapython/models/inline_response2001.py | 141 + giteapython/models/internal_tracker.py | 173 + giteapython/models/issue.py | 635 + giteapython/models/issue_deadline.py | 115 + giteapython/models/issue_labels_option.py | 117 + giteapython/models/label.py | 219 + giteapython/models/markdown_option.py | 201 + .../models/merge_pull_request_option.py | 200 + giteapython/models/migrate_repo_form.py | 456 + giteapython/models/milestone.py | 297 + giteapython/models/notification_count.py | 115 + giteapython/models/notification_subject.py | 193 + giteapython/models/notification_thread.py | 271 + giteapython/models/o_auth2_application.py | 245 + giteapython/models/organization.py | 323 + giteapython/models/payload_commit.py | 351 + .../models/payload_commit_verification.py | 219 + giteapython/models/payload_user.py | 169 + giteapython/models/permission.py | 167 + giteapython/models/pr_branch_info.py | 219 + giteapython/models/public_key.py | 323 + giteapython/models/pull_request.py | 791 ++ giteapython/models/pull_request_meta.py | 141 + giteapython/models/pull_review.py | 375 + giteapython/models/pull_review_comment.py | 453 + giteapython/models/reaction.py | 167 + giteapython/models/reference.py | 167 + giteapython/models/release.py | 479 + giteapython/models/repo_commit.py | 219 + giteapython/models/repo_topic_options.py | 117 + giteapython/models/repository.py | 1129 ++ giteapython/models/repository_meta.py | 193 + giteapython/models/review_state_type.py | 87 + giteapython/models/search_results.py | 141 + giteapython/models/server_version.py | 115 + giteapython/models/state_type.py | 87 + giteapython/models/status.py | 323 + giteapython/models/status_state.py | 87 + giteapython/models/stop_watch.py | 141 + .../models/submit_pull_review_options.py | 141 + giteapython/models/tag.py | 219 + giteapython/models/team.py | 303 + giteapython/models/time_stamp.py | 87 + giteapython/models/topic_name.py | 115 + giteapython/models/topic_response.py | 219 + giteapython/models/tracked_time.py | 277 + giteapython/models/transfer_repo_option.py | 144 + giteapython/models/update_file_options.py | 337 + giteapython/models/user.py | 335 + giteapython/models/user_heatmap_data.py | 141 + giteapython/models/watch_info.py | 245 + giteapython/rest.py | 323 + requirements.txt | 5 + setup.py | 46 + test-requirements.txt | 5 + test/__init__.py | 0 test/test_access_token.py | 40 + test/test_add_collaborator_option.py | 40 + test/test_add_time_option.py | 40 + test/test_admin_api.py | 97 + test/test_annotated_tag.py | 40 + test/test_annotated_tag_object.py | 40 + test/test_api_error.py | 40 + test/test_attachment.py | 40 + test/test_branch.py | 40 + test/test_branch_protection.py | 40 + test/test_comment.py | 40 + test/test_commit.py | 40 + test/test_commit_date_options.py | 40 + test/test_commit_meta.py | 40 + test/test_commit_user.py | 40 + test/test_contents_response.py | 40 + test/test_create_branch_protection_option.py | 40 + test/test_create_email_option.py | 40 + test/test_create_file_options.py | 40 + test/test_create_fork_option.py | 40 + test/test_create_gpg_key_option.py | 40 + test/test_create_hook_option.py | 40 + test/test_create_hook_option_config.py | 40 + test/test_create_issue_comment_option.py | 40 + test/test_create_issue_option.py | 40 + test/test_create_key_option.py | 40 + test/test_create_label_option.py | 40 + test/test_create_milestone_option.py | 40 + ...test_create_o_auth2_application_options.py | 40 + test/test_create_org_option.py | 40 + test/test_create_pull_request_option.py | 40 + test/test_create_pull_review_comment.py | 40 + test/test_create_pull_review_options.py | 40 + test/test_create_release_option.py | 40 + test/test_create_repo_option.py | 40 + test/test_create_status_option.py | 40 + test/test_create_team_option.py | 40 + test/test_create_user_option.py | 40 + test/test_delete_email_option.py | 40 + test/test_delete_file_options.py | 40 + test/test_deploy_key.py | 40 + test/test_edit_attachment_options.py | 40 + test/test_edit_branch_protection_option.py | 40 + test/test_edit_deadline_option.py | 40 + test/test_edit_git_hook_option.py | 40 + test/test_edit_hook_option.py | 40 + test/test_edit_issue_comment_option.py | 40 + test/test_edit_issue_option.py | 40 + test/test_edit_label_option.py | 40 + test/test_edit_milestone_option.py | 40 + test/test_edit_org_option.py | 40 + test/test_edit_pull_request_option.py | 40 + test/test_edit_reaction_option.py | 40 + test/test_edit_release_option.py | 40 + test/test_edit_repo_option.py | 40 + test/test_edit_team_option.py | 40 + test/test_edit_user_option.py | 40 + test/test_email.py | 40 + test/test_external_tracker.py | 40 + test/test_external_wiki.py | 40 + test/test_file_commit_response.py | 40 + test/test_file_delete_response.py | 40 + test/test_file_links_response.py | 40 + test/test_file_response.py | 40 + test/test_git_blob_response.py | 40 + test/test_git_entry.py | 40 + test/test_git_hook.py | 40 + test/test_git_object.py | 40 + test/test_git_tree_response.py | 40 + test/test_gpg_key.py | 40 + test/test_gpg_key_email.py | 40 + test/test_hook.py | 40 + test/test_identity.py | 40 + test/test_inline_response200.py | 40 + test/test_inline_response2001.py | 40 + test/test_internal_tracker.py | 40 + test/test_issue.py | 40 + test/test_issue_api.py | 356 + test/test_issue_deadline.py | 40 + test/test_issue_labels_option.py | 40 + test/test_label.py | 40 + test/test_markdown_option.py | 40 + test/test_merge_pull_request_option.py | 40 + test/test_migrate_repo_form.py | 40 + test/test_milestone.py | 40 + test/test_miscellaneous_api.py | 62 + 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 | 40 + test/test_organization_api.py | 314 + test/test_payload_commit.py | 40 + test/test_payload_commit_verification.py | 40 + test/test_payload_user.py | 40 + test/test_permission.py | 40 + test/test_pr_branch_info.py | 40 + test/test_public_key.py | 40 + test/test_pull_request.py | 40 + test/test_pull_request_meta.py | 40 + test/test_pull_review.py | 40 + test/test_pull_review_comment.py | 40 + test/test_reaction.py | 40 + test/test_reference.py | 40 + test/test_release.py | 40 + test/test_repo_commit.py | 40 + test/test_repo_topic_options.py | 40 + test/test_repository.py | 40 + test/test_repository_api.py | 671 + test/test_repository_meta.py | 40 + test/test_review_state_type.py | 40 + test/test_search_results.py | 40 + test/test_server_version.py | 40 + test/test_state_type.py | 40 + test/test_status.py | 40 + test/test_status_state.py | 40 + test/test_stop_watch.py | 40 + test/test_submit_pull_review_options.py | 40 + test/test_tag.py | 40 + test/test_team.py | 40 + test/test_time_stamp.py | 40 + test/test_topic_name.py | 40 + test/test_topic_response.py | 40 + test/test_tracked_time.py | 40 + test/test_transfer_repo_option.py | 40 + test/test_update_file_options.py | 40 + test/test_user.py | 40 + test/test_user_api.py | 356 + test/test_user_heatmap_data.py | 40 + test/test_watch_info.py | 40 + tox.ini | 10 + 410 files changed, 87335 insertions(+) create mode 100644 .gitignore create mode 100644 .swagger-codegen-ignore create mode 100644 .swagger-codegen/VERSION create mode 100644 .travis.yml create mode 100644 README.md create mode 100644 docs/APIError.md create mode 100644 docs/AccessToken.md create mode 100644 docs/AddCollaboratorOption.md create mode 100644 docs/AddTimeOption.md create mode 100644 docs/AdminApi.md create mode 100644 docs/AnnotatedTag.md create mode 100644 docs/AnnotatedTagObject.md create mode 100644 docs/Attachment.md create mode 100644 docs/Branch.md create mode 100644 docs/BranchProtection.md create mode 100644 docs/Comment.md create mode 100644 docs/Commit.md create mode 100644 docs/CommitDateOptions.md create mode 100644 docs/CommitMeta.md create mode 100644 docs/CommitUser.md create mode 100644 docs/ContentsResponse.md create mode 100644 docs/CreateBranchProtectionOption.md create mode 100644 docs/CreateEmailOption.md create mode 100644 docs/CreateFileOptions.md create mode 100644 docs/CreateForkOption.md create mode 100644 docs/CreateGPGKeyOption.md create mode 100644 docs/CreateHookOption.md create mode 100644 docs/CreateHookOptionConfig.md create mode 100644 docs/CreateIssueCommentOption.md create mode 100644 docs/CreateIssueOption.md create mode 100644 docs/CreateKeyOption.md create mode 100644 docs/CreateLabelOption.md create mode 100644 docs/CreateMilestoneOption.md create mode 100644 docs/CreateOAuth2ApplicationOptions.md create mode 100644 docs/CreateOrgOption.md create mode 100644 docs/CreatePullRequestOption.md create mode 100644 docs/CreatePullReviewComment.md create mode 100644 docs/CreatePullReviewOptions.md create mode 100644 docs/CreateReleaseOption.md create mode 100644 docs/CreateRepoOption.md create mode 100644 docs/CreateStatusOption.md create mode 100644 docs/CreateTeamOption.md create mode 100644 docs/CreateUserOption.md create mode 100644 docs/DeleteEmailOption.md create mode 100644 docs/DeleteFileOptions.md create mode 100644 docs/DeployKey.md create mode 100644 docs/EditAttachmentOptions.md create mode 100644 docs/EditBranchProtectionOption.md create mode 100644 docs/EditDeadlineOption.md create mode 100644 docs/EditGitHookOption.md create mode 100644 docs/EditHookOption.md create mode 100644 docs/EditIssueCommentOption.md create mode 100644 docs/EditIssueOption.md create mode 100644 docs/EditLabelOption.md create mode 100644 docs/EditMilestoneOption.md create mode 100644 docs/EditOrgOption.md create mode 100644 docs/EditPullRequestOption.md create mode 100644 docs/EditReactionOption.md create mode 100644 docs/EditReleaseOption.md create mode 100644 docs/EditRepoOption.md create mode 100644 docs/EditTeamOption.md create mode 100644 docs/EditUserOption.md create mode 100644 docs/Email.md create mode 100644 docs/ExternalTracker.md create mode 100644 docs/ExternalWiki.md create mode 100644 docs/FileCommitResponse.md create mode 100644 docs/FileDeleteResponse.md create mode 100644 docs/FileLinksResponse.md create mode 100644 docs/FileResponse.md create mode 100644 docs/GPGKey.md create mode 100644 docs/GPGKeyEmail.md create mode 100644 docs/GitBlobResponse.md create mode 100644 docs/GitEntry.md create mode 100644 docs/GitHook.md create mode 100644 docs/GitObject.md create mode 100644 docs/GitTreeResponse.md create mode 100644 docs/Hook.md create mode 100644 docs/Identity.md create mode 100644 docs/InlineResponse200.md create mode 100644 docs/InlineResponse2001.md create mode 100644 docs/InternalTracker.md create mode 100644 docs/Issue.md create mode 100644 docs/IssueApi.md create mode 100644 docs/IssueDeadline.md create mode 100644 docs/IssueLabelsOption.md create mode 100644 docs/Label.md create mode 100644 docs/MarkdownOption.md create mode 100644 docs/MergePullRequestOption.md create mode 100644 docs/MigrateRepoForm.md create mode 100644 docs/Milestone.md create mode 100644 docs/MiscellaneousApi.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/Organization.md create mode 100644 docs/OrganizationApi.md create mode 100644 docs/PRBranchInfo.md create mode 100644 docs/PayloadCommit.md create mode 100644 docs/PayloadCommitVerification.md create mode 100644 docs/PayloadUser.md create mode 100644 docs/Permission.md create mode 100644 docs/PublicKey.md create mode 100644 docs/PullRequest.md create mode 100644 docs/PullRequestMeta.md create mode 100644 docs/PullReview.md create mode 100644 docs/PullReviewComment.md create mode 100644 docs/Reaction.md create mode 100644 docs/Reference.md create mode 100644 docs/Release.md create mode 100644 docs/RepoCommit.md create mode 100644 docs/RepoTopicOptions.md create mode 100644 docs/Repository.md create mode 100644 docs/RepositoryApi.md create mode 100644 docs/RepositoryMeta.md create mode 100644 docs/ReviewStateType.md create mode 100644 docs/SearchResults.md create mode 100644 docs/ServerVersion.md create mode 100644 docs/StateType.md create mode 100644 docs/Status.md create mode 100644 docs/StatusState.md create mode 100644 docs/StopWatch.md create mode 100644 docs/SubmitPullReviewOptions.md create mode 100644 docs/Tag.md create mode 100644 docs/Team.md create mode 100644 docs/TimeStamp.md create mode 100644 docs/TopicName.md create mode 100644 docs/TopicResponse.md create mode 100644 docs/TrackedTime.md create mode 100644 docs/TransferRepoOption.md create mode 100644 docs/UpdateFileOptions.md create mode 100644 docs/User.md create mode 100644 docs/UserApi.md create mode 100644 docs/UserHeatmapData.md create mode 100644 docs/WatchInfo.md create mode 100644 git_push.sh create mode 100644 giteapython/__init__.py create mode 100644 giteapython/api/__init__.py create mode 100644 giteapython/api/admin_api.py create mode 100644 giteapython/api/issue_api.py create mode 100644 giteapython/api/miscellaneous_api.py create mode 100644 giteapython/api/notification_api.py create mode 100644 giteapython/api/organization_api.py create mode 100644 giteapython/api/repository_api.py create mode 100644 giteapython/api/user_api.py create mode 100644 giteapython/api_client.py create mode 100644 giteapython/configuration.py create mode 100644 giteapython/models/__init__.py create mode 100644 giteapython/models/access_token.py create mode 100644 giteapython/models/add_collaborator_option.py create mode 100644 giteapython/models/add_time_option.py create mode 100644 giteapython/models/annotated_tag.py create mode 100644 giteapython/models/annotated_tag_object.py create mode 100644 giteapython/models/api_error.py create mode 100644 giteapython/models/attachment.py create mode 100644 giteapython/models/branch.py create mode 100644 giteapython/models/branch_protection.py create mode 100644 giteapython/models/comment.py create mode 100644 giteapython/models/commit.py create mode 100644 giteapython/models/commit_date_options.py create mode 100644 giteapython/models/commit_meta.py create mode 100644 giteapython/models/commit_user.py create mode 100644 giteapython/models/contents_response.py create mode 100644 giteapython/models/create_branch_protection_option.py create mode 100644 giteapython/models/create_email_option.py create mode 100644 giteapython/models/create_file_options.py create mode 100644 giteapython/models/create_fork_option.py create mode 100644 giteapython/models/create_gpg_key_option.py create mode 100644 giteapython/models/create_hook_option.py create mode 100644 giteapython/models/create_hook_option_config.py create mode 100644 giteapython/models/create_issue_comment_option.py create mode 100644 giteapython/models/create_issue_option.py create mode 100644 giteapython/models/create_key_option.py create mode 100644 giteapython/models/create_label_option.py create mode 100644 giteapython/models/create_milestone_option.py create mode 100644 giteapython/models/create_o_auth2_application_options.py create mode 100644 giteapython/models/create_org_option.py create mode 100644 giteapython/models/create_pull_request_option.py create mode 100644 giteapython/models/create_pull_review_comment.py create mode 100644 giteapython/models/create_pull_review_options.py create mode 100644 giteapython/models/create_release_option.py create mode 100644 giteapython/models/create_repo_option.py create mode 100644 giteapython/models/create_status_option.py create mode 100644 giteapython/models/create_team_option.py create mode 100644 giteapython/models/create_user_option.py create mode 100644 giteapython/models/delete_email_option.py create mode 100644 giteapython/models/delete_file_options.py create mode 100644 giteapython/models/deploy_key.py create mode 100644 giteapython/models/edit_attachment_options.py create mode 100644 giteapython/models/edit_branch_protection_option.py create mode 100644 giteapython/models/edit_deadline_option.py create mode 100644 giteapython/models/edit_git_hook_option.py create mode 100644 giteapython/models/edit_hook_option.py create mode 100644 giteapython/models/edit_issue_comment_option.py create mode 100644 giteapython/models/edit_issue_option.py create mode 100644 giteapython/models/edit_label_option.py create mode 100644 giteapython/models/edit_milestone_option.py create mode 100644 giteapython/models/edit_org_option.py create mode 100644 giteapython/models/edit_pull_request_option.py create mode 100644 giteapython/models/edit_reaction_option.py create mode 100644 giteapython/models/edit_release_option.py create mode 100644 giteapython/models/edit_repo_option.py create mode 100644 giteapython/models/edit_team_option.py create mode 100644 giteapython/models/edit_user_option.py create mode 100644 giteapython/models/email.py create mode 100644 giteapython/models/external_tracker.py create mode 100644 giteapython/models/external_wiki.py create mode 100644 giteapython/models/file_commit_response.py create mode 100644 giteapython/models/file_delete_response.py create mode 100644 giteapython/models/file_links_response.py create mode 100644 giteapython/models/file_response.py create mode 100644 giteapython/models/git_blob_response.py create mode 100644 giteapython/models/git_entry.py create mode 100644 giteapython/models/git_hook.py create mode 100644 giteapython/models/git_object.py create mode 100644 giteapython/models/git_tree_response.py create mode 100644 giteapython/models/gpg_key.py create mode 100644 giteapython/models/gpg_key_email.py create mode 100644 giteapython/models/hook.py create mode 100644 giteapython/models/identity.py create mode 100644 giteapython/models/inline_response200.py create mode 100644 giteapython/models/inline_response2001.py create mode 100644 giteapython/models/internal_tracker.py create mode 100644 giteapython/models/issue.py create mode 100644 giteapython/models/issue_deadline.py create mode 100644 giteapython/models/issue_labels_option.py create mode 100644 giteapython/models/label.py create mode 100644 giteapython/models/markdown_option.py create mode 100644 giteapython/models/merge_pull_request_option.py create mode 100644 giteapython/models/migrate_repo_form.py create mode 100644 giteapython/models/milestone.py create mode 100644 giteapython/models/notification_count.py create mode 100644 giteapython/models/notification_subject.py create mode 100644 giteapython/models/notification_thread.py create mode 100644 giteapython/models/o_auth2_application.py create mode 100644 giteapython/models/organization.py create mode 100644 giteapython/models/payload_commit.py create mode 100644 giteapython/models/payload_commit_verification.py create mode 100644 giteapython/models/payload_user.py create mode 100644 giteapython/models/permission.py create mode 100644 giteapython/models/pr_branch_info.py create mode 100644 giteapython/models/public_key.py create mode 100644 giteapython/models/pull_request.py create mode 100644 giteapython/models/pull_request_meta.py create mode 100644 giteapython/models/pull_review.py create mode 100644 giteapython/models/pull_review_comment.py create mode 100644 giteapython/models/reaction.py create mode 100644 giteapython/models/reference.py create mode 100644 giteapython/models/release.py create mode 100644 giteapython/models/repo_commit.py create mode 100644 giteapython/models/repo_topic_options.py create mode 100644 giteapython/models/repository.py create mode 100644 giteapython/models/repository_meta.py create mode 100644 giteapython/models/review_state_type.py create mode 100644 giteapython/models/search_results.py create mode 100644 giteapython/models/server_version.py create mode 100644 giteapython/models/state_type.py create mode 100644 giteapython/models/status.py create mode 100644 giteapython/models/status_state.py create mode 100644 giteapython/models/stop_watch.py create mode 100644 giteapython/models/submit_pull_review_options.py create mode 100644 giteapython/models/tag.py create mode 100644 giteapython/models/team.py create mode 100644 giteapython/models/time_stamp.py create mode 100644 giteapython/models/topic_name.py create mode 100644 giteapython/models/topic_response.py create mode 100644 giteapython/models/tracked_time.py create mode 100644 giteapython/models/transfer_repo_option.py create mode 100644 giteapython/models/update_file_options.py create mode 100644 giteapython/models/user.py create mode 100644 giteapython/models/user_heatmap_data.py create mode 100644 giteapython/models/watch_info.py create mode 100644 giteapython/rest.py create mode 100644 requirements.txt create mode 100644 setup.py create mode 100644 test-requirements.txt create mode 100644 test/__init__.py create mode 100644 test/test_access_token.py create mode 100644 test/test_add_collaborator_option.py create mode 100644 test/test_add_time_option.py create mode 100644 test/test_admin_api.py create mode 100644 test/test_annotated_tag.py create mode 100644 test/test_annotated_tag_object.py create mode 100644 test/test_api_error.py create mode 100644 test/test_attachment.py create mode 100644 test/test_branch.py create mode 100644 test/test_branch_protection.py create mode 100644 test/test_comment.py create mode 100644 test/test_commit.py create mode 100644 test/test_commit_date_options.py create mode 100644 test/test_commit_meta.py create mode 100644 test/test_commit_user.py create mode 100644 test/test_contents_response.py create mode 100644 test/test_create_branch_protection_option.py create mode 100644 test/test_create_email_option.py create mode 100644 test/test_create_file_options.py create mode 100644 test/test_create_fork_option.py create mode 100644 test/test_create_gpg_key_option.py create mode 100644 test/test_create_hook_option.py create mode 100644 test/test_create_hook_option_config.py create mode 100644 test/test_create_issue_comment_option.py create mode 100644 test/test_create_issue_option.py create mode 100644 test/test_create_key_option.py create mode 100644 test/test_create_label_option.py create mode 100644 test/test_create_milestone_option.py create mode 100644 test/test_create_o_auth2_application_options.py create mode 100644 test/test_create_org_option.py create mode 100644 test/test_create_pull_request_option.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_create_release_option.py create mode 100644 test/test_create_repo_option.py create mode 100644 test/test_create_status_option.py create mode 100644 test/test_create_team_option.py create mode 100644 test/test_create_user_option.py create mode 100644 test/test_delete_email_option.py create mode 100644 test/test_delete_file_options.py create mode 100644 test/test_deploy_key.py create mode 100644 test/test_edit_attachment_options.py create mode 100644 test/test_edit_branch_protection_option.py create mode 100644 test/test_edit_deadline_option.py create mode 100644 test/test_edit_git_hook_option.py create mode 100644 test/test_edit_hook_option.py create mode 100644 test/test_edit_issue_comment_option.py create mode 100644 test/test_edit_issue_option.py create mode 100644 test/test_edit_label_option.py create mode 100644 test/test_edit_milestone_option.py create mode 100644 test/test_edit_org_option.py create mode 100644 test/test_edit_pull_request_option.py create mode 100644 test/test_edit_reaction_option.py create mode 100644 test/test_edit_release_option.py create mode 100644 test/test_edit_repo_option.py create mode 100644 test/test_edit_team_option.py create mode 100644 test/test_edit_user_option.py create mode 100644 test/test_email.py create mode 100644 test/test_external_tracker.py create mode 100644 test/test_external_wiki.py create mode 100644 test/test_file_commit_response.py create mode 100644 test/test_file_delete_response.py create mode 100644 test/test_file_links_response.py create mode 100644 test/test_file_response.py create mode 100644 test/test_git_blob_response.py create mode 100644 test/test_git_entry.py create mode 100644 test/test_git_hook.py create mode 100644 test/test_git_object.py create mode 100644 test/test_git_tree_response.py create mode 100644 test/test_gpg_key.py create mode 100644 test/test_gpg_key_email.py create mode 100644 test/test_hook.py create mode 100644 test/test_identity.py create mode 100644 test/test_inline_response200.py create mode 100644 test/test_inline_response2001.py create mode 100644 test/test_internal_tracker.py create mode 100644 test/test_issue.py create mode 100644 test/test_issue_api.py create mode 100644 test/test_issue_deadline.py create mode 100644 test/test_issue_labels_option.py create mode 100644 test/test_label.py create mode 100644 test/test_markdown_option.py create mode 100644 test/test_merge_pull_request_option.py create mode 100644 test/test_migrate_repo_form.py create mode 100644 test/test_milestone.py create mode 100644 test/test_miscellaneous_api.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_organization.py create mode 100644 test/test_organization_api.py create mode 100644 test/test_payload_commit.py create mode 100644 test/test_payload_commit_verification.py create mode 100644 test/test_payload_user.py create mode 100644 test/test_permission.py create mode 100644 test/test_pr_branch_info.py create mode 100644 test/test_public_key.py create mode 100644 test/test_pull_request.py create mode 100644 test/test_pull_request_meta.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_reference.py create mode 100644 test/test_release.py create mode 100644 test/test_repo_commit.py create mode 100644 test/test_repo_topic_options.py create mode 100644 test/test_repository.py create mode 100644 test/test_repository_api.py create mode 100644 test/test_repository_meta.py create mode 100644 test/test_review_state_type.py create mode 100644 test/test_search_results.py create mode 100644 test/test_server_version.py create mode 100644 test/test_state_type.py create mode 100644 test/test_status.py create mode 100644 test/test_status_state.py create mode 100644 test/test_stop_watch.py create mode 100644 test/test_submit_pull_review_options.py create mode 100644 test/test_tag.py create mode 100644 test/test_team.py create mode 100644 test/test_time_stamp.py create mode 100644 test/test_topic_name.py create mode 100644 test/test_topic_response.py create mode 100644 test/test_tracked_time.py create mode 100644 test/test_transfer_repo_option.py create mode 100644 test/test_update_file_options.py create mode 100644 test/test_user.py create mode 100644 test/test_user_api.py create mode 100644 test/test_user_heatmap_data.py create mode 100644 test/test_watch_info.py create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a655050 --- /dev/null +++ b/.gitignore @@ -0,0 +1,64 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.python-version + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/.swagger-codegen-ignore b/.swagger-codegen-ignore new file mode 100644 index 0000000..c5fa491 --- /dev/null +++ b/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/.swagger-codegen/VERSION b/.swagger-codegen/VERSION new file mode 100644 index 0000000..b29b920 --- /dev/null +++ b/.swagger-codegen/VERSION @@ -0,0 +1 @@ +2.4.17 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..86211e2 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +# ref: https://docs.travis-ci.com/user/languages/python +language: python +python: + - "2.7" + - "3.2" + - "3.3" + - "3.4" + - "3.5" + #- "3.5-dev" # 3.5 development branch + #- "nightly" # points to the latest development branch e.g. 3.6-dev +# command to install dependencies +install: "pip install -r requirements.txt" +# command to run tests +script: nosetests diff --git a/README.md b/README.md new file mode 100644 index 0000000..6c16b0c --- /dev/null +++ b/README.md @@ -0,0 +1,518 @@ +# giteapython +This documentation describes the Gitea API. + +This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: + +- API version: 1.1.1 +- Package version: 1.0.0 +- Build package: io.swagger.codegen.languages.PythonClientCodegen + +## Requirements. + +Python 2.7 and 3.4+ + +## Installation & Usage +### pip install + +If the python package is hosted on Github, you can install directly from Github + +```sh +pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import giteapython +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import giteapython +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.AdminApi(giteapython.ApiClient(configuration)) +username = 'username_example' # str | username of the user that will own the created organization +organization = giteapython.CreateOrgOption() # CreateOrgOption | + +try: + # Create an organization + api_response = api_instance.admin_create_org(username, organization) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_create_org: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost/api/v1* + +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 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 +*AdminApi* | [**admin_edit_user**](docs/AdminApi.md#admin_edit_user) | **PATCH** /admin/users/{username} | Edit an existing user +*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_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. +*IssueApi* | [**issue_create_label**](docs/IssueApi.md#issue_create_label) | **POST** /repos/{owner}/{repo}/labels | Create a label +*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 +*IssueApi* | [**issue_get_milestones_list**](docs/IssueApi.md#issue_get_milestones_list) | **GET** /repos/{owner}/{repo}/milestones | Get all of a repository's opened milestones +*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_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 +*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, pinned or unread +*NotificationApi* | [**notify_read_repo_list**](docs/NotificationApi.md#notify_read_repo_list) | **PUT** /repos/{owner}/{repo}/notifications | Mark notification threads as read, pinned or unread 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 +*OrganizationApi* | [**org_list_team_member**](docs/OrganizationApi.md#org_list_team_member) | **GET** /teams/{id}/members/{username} | List a particular member of team +*OrganizationApi* | [**org_list_team_members**](docs/OrganizationApi.md#org_list_team_members) | **GET** /teams/{id}/members | List a team's members +*OrganizationApi* | [**org_list_team_repos**](docs/OrganizationApi.md#org_list_team_repos) | **GET** /teams/{id}/repos | List a team's repos +*OrganizationApi* | [**org_list_teams**](docs/OrganizationApi.md#org_list_teams) | **GET** /orgs/{org}/teams | List an organization's teams +*OrganizationApi* | [**org_list_user_orgs**](docs/OrganizationApi.md#org_list_user_orgs) | **GET** /users/{username}/orgs | List a user's organizations +*OrganizationApi* | [**org_publicize_member**](docs/OrganizationApi.md#org_publicize_member) | **PUT** /orgs/{org}/public_members/{username} | Publicize a user's membership +*OrganizationApi* | [**org_remove_team_member**](docs/OrganizationApi.md#org_remove_team_member) | **DELETE** /teams/{id}/members/{username} | Remove a team member +*OrganizationApi* | [**org_remove_team_repository**](docs/OrganizationApi.md#org_remove_team_repository) | **DELETE** /teams/{id}/repos/{org}/{repo} | Remove a repository from a team +*OrganizationApi* | [**team_search**](docs/OrganizationApi.md#team_search) | **GET** /orgs/{org}/teams/search | Search for teams within an organization +*RepositoryApi* | [**create_current_user_repo**](docs/RepositoryApi.md#create_current_user_repo) | **POST** /user/repos | Create a repository +*RepositoryApi* | [**create_fork**](docs/RepositoryApi.md#create_fork) | **POST** /repos/{owner}/{repo}/forks | Fork a repository +*RepositoryApi* | [**get_blob**](docs/RepositoryApi.md#get_blob) | **GET** /repos/{owner}/{repo}/git/blobs/{sha} | Gets the blob of a repository. +*RepositoryApi* | [**get_tag**](docs/RepositoryApi.md#get_tag) | **GET** /repos/{owner}/{repo}/git/tags/{sha} | Gets the tag object of an annotated tag (not lightweight tags) +*RepositoryApi* | [**get_tree**](docs/RepositoryApi.md#get_tree) | **GET** /repos/{owner}/{repo}/git/trees/{sha} | Gets the tree of a repository. +*RepositoryApi* | [**list_forks**](docs/RepositoryApi.md#list_forks) | **GET** /repos/{owner}/{repo}/forks | List a repository's forks +*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. 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, 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 +*RepositoryApi* | [**repo_get_contents_list**](docs/RepositoryApi.md#repo_get_contents_list) | **GET** /repos/{owner}/{repo}/contents | Gets the metadata of all the entries of the root dir +*RepositoryApi* | [**repo_get_editor_config**](docs/RepositoryApi.md#repo_get_editor_config) | **GET** /repos/{owner}/{repo}/editorconfig/{filepath} | Get the EditorConfig definitions of a file in a repository +*RepositoryApi* | [**repo_get_git_hook**](docs/RepositoryApi.md#repo_get_git_hook) | **GET** /repos/{owner}/{repo}/hooks/git/{id} | Get a Git hook +*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_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 +*RepositoryApi* | [**repo_list_git_refs**](docs/RepositoryApi.md#repo_list_git_refs) | **GET** /repos/{owner}/{repo}/git/refs/{ref} | Get specified ref or filtered repository's refs +*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 +*RepositoryApi* | [**repo_list_statuses**](docs/RepositoryApi.md#repo_list_statuses) | **GET** /repos/{owner}/{repo}/statuses/{sha} | Get a commit's statuses +*RepositoryApi* | [**repo_list_subscribers**](docs/RepositoryApi.md#repo_list_subscribers) | **GET** /repos/{owner}/{repo}/subscribers | List a repo's watchers +*RepositoryApi* | [**repo_list_tags**](docs/RepositoryApi.md#repo_list_tags) | **GET** /repos/{owner}/{repo}/tags | List a repository's tags +*RepositoryApi* | [**repo_list_topics**](docs/RepositoryApi.md#repo_list_topics) | **GET** /repos/{owner}/{repo}/topics | Get list of topics that a repository has +*RepositoryApi* | [**repo_merge_pull_request**](docs/RepositoryApi.md#repo_merge_pull_request) | **POST** /repos/{owner}/{repo}/pulls/{index}/merge | Merge a pull request +*RepositoryApi* | [**repo_migrate**](docs/RepositoryApi.md#repo_migrate) | **POST** /repos/migrate | Migrate a remote git repository +*RepositoryApi* | [**repo_mirror_sync**](docs/RepositoryApi.md#repo_mirror_sync) | **POST** /repos/{owner}/{repo}/mirror-sync | Sync a mirrored repository +*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 +*UserApi* | [**user_current_delete_follow**](docs/UserApi.md#user_current_delete_follow) | **DELETE** /user/following/{username} | Unfollow a user +*UserApi* | [**user_current_delete_gpg_key**](docs/UserApi.md#user_current_delete_gpg_key) | **DELETE** /user/gpg_keys/{id} | Remove a GPG key +*UserApi* | [**user_current_delete_key**](docs/UserApi.md#user_current_delete_key) | **DELETE** /user/keys/{id} | Delete a public key +*UserApi* | [**user_current_delete_star**](docs/UserApi.md#user_current_delete_star) | **DELETE** /user/starred/{owner}/{repo} | Unstar the given repo +*UserApi* | [**user_current_get_gpg_key**](docs/UserApi.md#user_current_get_gpg_key) | **GET** /user/gpg_keys/{id} | Get a GPG key +*UserApi* | [**user_current_get_key**](docs/UserApi.md#user_current_get_key) | **GET** /user/keys/{id} | Get a public key +*UserApi* | [**user_current_list_followers**](docs/UserApi.md#user_current_list_followers) | **GET** /user/followers | List the authenticated user's followers +*UserApi* | [**user_current_list_following**](docs/UserApi.md#user_current_list_following) | **GET** /user/following | List the users that the authenticated user is following +*UserApi* | [**user_current_list_gpg_keys**](docs/UserApi.md#user_current_list_gpg_keys) | **GET** /user/gpg_keys | List the authenticated user's GPG keys +*UserApi* | [**user_current_list_keys**](docs/UserApi.md#user_current_list_keys) | **GET** /user/keys | List the authenticated user's public keys +*UserApi* | [**user_current_list_repos**](docs/UserApi.md#user_current_list_repos) | **GET** /user/repos | List the repos that the authenticated user owns or has access to +*UserApi* | [**user_current_list_starred**](docs/UserApi.md#user_current_list_starred) | **GET** /user/starred | The repos that the authenticated user has starred +*UserApi* | [**user_current_list_subscriptions**](docs/UserApi.md#user_current_list_subscriptions) | **GET** /user/subscriptions | List repositories watched by the authenticated user +*UserApi* | [**user_current_post_gpg_key**](docs/UserApi.md#user_current_post_gpg_key) | **POST** /user/gpg_keys | Create a GPG key +*UserApi* | [**user_current_post_key**](docs/UserApi.md#user_current_post_key) | **POST** /user/keys | Create a public key +*UserApi* | [**user_current_put_follow**](docs/UserApi.md#user_current_put_follow) | **PUT** /user/following/{username} | Follow a user +*UserApi* | [**user_current_put_star**](docs/UserApi.md#user_current_put_star) | **PUT** /user/starred/{owner}/{repo} | Star the given repo +*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 +*UserApi* | [**user_list_following**](docs/UserApi.md#user_list_following) | **GET** /users/{username}/following | List the users that the given user is following +*UserApi* | [**user_list_gpg_keys**](docs/UserApi.md#user_list_gpg_keys) | **GET** /users/{username}/gpg_keys | List the given user's GPG keys +*UserApi* | [**user_list_keys**](docs/UserApi.md#user_list_keys) | **GET** /users/{username}/keys | List the given user's public keys +*UserApi* | [**user_list_repos**](docs/UserApi.md#user_list_repos) | **GET** /users/{username}/repos | List the repos owned by the given user +*UserApi* | [**user_list_starred**](docs/UserApi.md#user_list_starred) | **GET** /users/{username}/starred | The repos that the given user has starred +*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_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 + + - [APIError](docs/APIError.md) + - [AccessToken](docs/AccessToken.md) + - [AddCollaboratorOption](docs/AddCollaboratorOption.md) + - [AddTimeOption](docs/AddTimeOption.md) + - [AnnotatedTag](docs/AnnotatedTag.md) + - [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) + - [CreateTeamOption](docs/CreateTeamOption.md) + - [CreateUserOption](docs/CreateUserOption.md) + - [DeleteEmailOption](docs/DeleteEmailOption.md) + - [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) + - [EditIssueCommentOption](docs/EditIssueCommentOption.md) + - [EditIssueOption](docs/EditIssueOption.md) + - [EditLabelOption](docs/EditLabelOption.md) + - [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) + - [EditUserOption](docs/EditUserOption.md) + - [Email](docs/Email.md) + - [ExternalTracker](docs/ExternalTracker.md) + - [ExternalWiki](docs/ExternalWiki.md) + - [FileCommitResponse](docs/FileCommitResponse.md) + - [FileDeleteResponse](docs/FileDeleteResponse.md) + - [FileLinksResponse](docs/FileLinksResponse.md) + - [FileResponse](docs/FileResponse.md) + - [GPGKey](docs/GPGKey.md) + - [GPGKeyEmail](docs/GPGKeyEmail.md) + - [GitBlobResponse](docs/GitBlobResponse.md) + - [GitEntry](docs/GitEntry.md) + - [GitHook](docs/GitHook.md) + - [GitObject](docs/GitObject.md) + - [GitTreeResponse](docs/GitTreeResponse.md) + - [Hook](docs/Hook.md) + - [Identity](docs/Identity.md) + - [InlineResponse200](docs/InlineResponse200.md) + - [InlineResponse2001](docs/InlineResponse2001.md) + - [InternalTracker](docs/InternalTracker.md) + - [Issue](docs/Issue.md) + - [IssueDeadline](docs/IssueDeadline.md) + - [IssueLabelsOption](docs/IssueLabelsOption.md) + - [Label](docs/Label.md) + - [MarkdownOption](docs/MarkdownOption.md) + - [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) + - [PayloadCommitVerification](docs/PayloadCommitVerification.md) + - [PayloadUser](docs/PayloadUser.md) + - [Permission](docs/Permission.md) + - [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) + - [WatchInfo](docs/WatchInfo.md) + + +## Documentation For Authorization + + +## AccessToken + +- **Type**: API key +- **API key parameter name**: access_token +- **Location**: URL query string + +## AuthorizationHeaderToken + +- **Type**: API key +- **API key parameter name**: Authorization +- **Location**: HTTP header + +## BasicAuth + +- **Type**: HTTP basic authentication + +## SudoHeader + +- **Type**: API key +- **API key parameter name**: Sudo +- **Location**: HTTP header + +## SudoParam + +- **Type**: API key +- **API key parameter name**: sudo +- **Location**: URL query string + +## Token + +- **Type**: API key +- **API key parameter name**: token +- **Location**: URL query string + + +## Author + + + diff --git a/docs/APIError.md b/docs/APIError.md new file mode 100644 index 0000000..8f68675 --- /dev/null +++ b/docs/APIError.md @@ -0,0 +1,11 @@ +# APIError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..57c010b --- /dev/null +++ b/docs/AccessToken.md @@ -0,0 +1,10 @@ +# AccessToken + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..c490957 --- /dev/null +++ b/docs/AddCollaboratorOption.md @@ -0,0 +1,10 @@ +# AddCollaboratorOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..702997c --- /dev/null +++ b/docs/AddTimeOption.md @@ -0,0 +1,12 @@ +# AddTimeOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..2b9ce68 --- /dev/null +++ b/docs/AdminApi.md @@ -0,0 +1,713 @@ +# giteapython.AdminApi + +All URIs are relative to *http://localhost/api/v1* + +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 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 +[**admin_edit_user**](AdminApi.md#admin_edit_user) | **PATCH** /admin/users/{username} | Edit an existing user +[**admin_get_all_orgs**](AdminApi.md#admin_get_all_orgs) | **GET** /admin/orgs | List all organizations +[**admin_get_all_users**](AdminApi.md#admin_get_all_users) | **GET** /admin/users | List all users + + +# **admin_create_org** +> Organization admin_create_org(username, organization) + +Create an organization + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.AdminApi(giteapython.ApiClient(configuration)) +username = 'username_example' # str | username of the user that will own the created organization +organization = giteapython.CreateOrgOption() # CreateOrgOption | + +try: + # Create an organization + api_response = api_instance.admin_create_org(username, organization) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_create_org: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of the user that will own the created organization | + **organization** | [**CreateOrgOption**](CreateOrgOption.md)| | + +### Return type + +[**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 + - **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) + +# **admin_create_public_key** +> PublicKey admin_create_public_key(username, key=key) + +Add a public key on behalf of a user + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.AdminApi(giteapython.ApiClient(configuration)) +username = 'username_example' # str | username of the user +key = giteapython.CreateKeyOption() # CreateKeyOption | (optional) + +try: + # Add a public key on behalf of a user + api_response = api_instance.admin_create_public_key(username, key=key) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_create_public_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of the user | + **key** | [**CreateKeyOption**](CreateKeyOption.md)| | [optional] + +### Return type + +[**PublicKey**](PublicKey.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) + +# **admin_create_repo** +> Repository admin_create_repo(username, repository) + +Create a repository on behalf of a user + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.AdminApi(giteapython.ApiClient(configuration)) +username = 'username_example' # str | username of the user. This user will own the created repository +repository = giteapython.CreateRepoOption() # CreateRepoOption | + +try: + # Create a repository on behalf of a user + api_response = api_instance.admin_create_repo(username, repository) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_create_repo: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of the user. This user will own the created repository | + **repository** | [**CreateRepoOption**](CreateRepoOption.md)| | + +### 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) + +# **admin_create_user** +> User admin_create_user(body=body) + +Create a user + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.AdminApi(giteapython.ApiClient(configuration)) +body = giteapython.CreateUserOption() # CreateUserOption | (optional) + +try: + # Create a user + api_response = api_instance.admin_create_user(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_create_user: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateUserOption**](CreateUserOption.md)| | [optional] + +### Return type + +[**User**](User.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) + +# **admin_delete_user** +> admin_delete_user(username) + +Delete a user + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.AdminApi(giteapython.ApiClient(configuration)) +username = 'username_example' # str | username of user to delete + +try: + # Delete a user + api_instance.admin_delete_user(username) +except ApiException as e: + print("Exception when calling AdminApi->admin_delete_user: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user 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 + +[[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_delete_user_public_key** +> admin_delete_user_public_key(username, id) + +Delete a user's public key + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.AdminApi(giteapython.ApiClient(configuration)) +username = 'username_example' # str | username of user +id = 789 # int | id of the key to delete + +try: + # Delete a user's public key + api_instance.admin_delete_user_public_key(username, id) +except ApiException as e: + print("Exception when calling AdminApi->admin_delete_user_public_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user | + **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 + +[[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_edit_user** +> User admin_edit_user(username, body=body) + +Edit an existing user + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.AdminApi(giteapython.ApiClient(configuration)) +username = 'username_example' # str | username of user to edit +body = giteapython.EditUserOption() # EditUserOption | (optional) + +try: + # Edit an existing user + api_response = api_instance.admin_edit_user(username, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_edit_user: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user to edit | + **body** | [**EditUserOption**](EditUserOption.md)| | [optional] + +### Return type + +[**User**](User.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) + +# **admin_get_all_orgs** +> list[Organization] admin_get_all_orgs(page=page, limit=limit) + +List all organizations + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.AdminApi(giteapython.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 organizations + api_response = api_instance.admin_get_all_orgs(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_get_all_orgs: %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) + +# **admin_get_all_users** +> list[User] admin_get_all_users(page=page, limit=limit) + +List all users + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.AdminApi(giteapython.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(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->admin_get_all_users: %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[User]**](User.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/AnnotatedTag.md b/docs/AnnotatedTag.md new file mode 100644 index 0000000..e57846d --- /dev/null +++ b/docs/AnnotatedTag.md @@ -0,0 +1,16 @@ +# AnnotatedTag + +## 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] + +[[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 new file mode 100644 index 0000000..34ae757 --- /dev/null +++ b/docs/AnnotatedTagObject.md @@ -0,0 +1,12 @@ +# AnnotatedTagObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..d5ea21c --- /dev/null +++ b/docs/Attachment.md @@ -0,0 +1,16 @@ +# Attachment + +## 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] + +[[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 new file mode 100644 index 0000000..f1597b2 --- /dev/null +++ b/docs/Branch.md @@ -0,0 +1,18 @@ +# Branch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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..8bb7419 --- /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 new file mode 100644 index 0000000..8c4e605 --- /dev/null +++ b/docs/Comment.md @@ -0,0 +1,19 @@ +# Comment + +## 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] + +[[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 new file mode 100644 index 0000000..537eda0 --- /dev/null +++ b/docs/Commit.md @@ -0,0 +1,16 @@ +# Commit + +## 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] + +[[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..23530c2 --- /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 new file mode 100644 index 0000000..8086ce4 --- /dev/null +++ b/docs/CommitMeta.md @@ -0,0 +1,11 @@ +# CommitMeta + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..a5325f9 --- /dev/null +++ b/docs/CommitUser.md @@ -0,0 +1,12 @@ +# CommitUser + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_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 new file mode 100644 index 0000000..9c16343 --- /dev/null +++ b/docs/ContentsResponse.md @@ -0,0 +1,23 @@ +# ContentsResponse + +## 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] + +[[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..caa553b --- /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 new file mode 100644 index 0000000..9d48586 --- /dev/null +++ b/docs/CreateEmailOption.md @@ -0,0 +1,10 @@ +# CreateEmailOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..3311316 --- /dev/null +++ b/docs/CreateFileOptions.md @@ -0,0 +1,16 @@ +# CreateFileOptions + +## 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 | +**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 new file mode 100644 index 0000000..a7a9286 --- /dev/null +++ b/docs/CreateForkOption.md @@ -0,0 +1,10 @@ +# CreateForkOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..2b1ce73 --- /dev/null +++ b/docs/CreateGPGKeyOption.md @@ -0,0 +1,10 @@ +# CreateGPGKeyOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..9dee295 --- /dev/null +++ b/docs/CreateHookOption.md @@ -0,0 +1,14 @@ +# CreateHookOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **bool** | | [optional] [default to False] +**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 new file mode 100644 index 0000000..734f961 --- /dev/null +++ b/docs/CreateIssueCommentOption.md @@ -0,0 +1,10 @@ +# CreateIssueCommentOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..132a223 --- /dev/null +++ b/docs/CreateIssueOption.md @@ -0,0 +1,17 @@ +# CreateIssueOption + +## 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** | | + +[[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 new file mode 100644 index 0000000..24a05fe --- /dev/null +++ b/docs/CreateKeyOption.md @@ -0,0 +1,12 @@ +# CreateKeyOption + +## 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 | + +[[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 new file mode 100644 index 0000000..ca36d21 --- /dev/null +++ b/docs/CreateLabelOption.md @@ -0,0 +1,12 @@ +# CreateLabelOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..9344912 --- /dev/null +++ b/docs/CreateMilestoneOption.md @@ -0,0 +1,12 @@ +# CreateMilestoneOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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..3d94c8e --- /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 new file mode 100644 index 0000000..8c52e3e --- /dev/null +++ b/docs/CreateOrgOption.md @@ -0,0 +1,16 @@ +# CreateOrgOption + +## 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] + +[[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 new file mode 100644 index 0000000..809043b --- /dev/null +++ b/docs/CreatePullRequestOption.md @@ -0,0 +1,18 @@ +# CreatePullRequestOption + +## 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] + +[[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..f41ff61 --- /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..7a7e06a --- /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 new file mode 100644 index 0000000..2a05830 --- /dev/null +++ b/docs/CreateReleaseOption.md @@ -0,0 +1,15 @@ +# CreateReleaseOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..78c8aa3 --- /dev/null +++ b/docs/CreateRepoOption.md @@ -0,0 +1,18 @@ +# CreateRepoOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..41537c9 --- /dev/null +++ b/docs/CreateStatusOption.md @@ -0,0 +1,13 @@ +# CreateStatusOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..234694e --- /dev/null +++ b/docs/CreateTeamOption.md @@ -0,0 +1,15 @@ +# CreateTeamOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..d898697 --- /dev/null +++ b/docs/CreateUserOption.md @@ -0,0 +1,17 @@ +# CreateUserOption + +## 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** | | + +[[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 new file mode 100644 index 0000000..9d5ab95 --- /dev/null +++ b/docs/DeleteEmailOption.md @@ -0,0 +1,10 @@ +# DeleteEmailOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..8bb9b04 --- /dev/null +++ b/docs/DeleteFileOptions.md @@ -0,0 +1,16 @@ +# DeleteFileOptions + +## 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] +**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 new file mode 100644 index 0000000..14d1c6b --- /dev/null +++ b/docs/DeployKey.md @@ -0,0 +1,18 @@ +# DeployKey + +## 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] + +[[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 new file mode 100644 index 0000000..00cac9b --- /dev/null +++ b/docs/EditAttachmentOptions.md @@ -0,0 +1,10 @@ +# EditAttachmentOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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..9190d69 --- /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 new file mode 100644 index 0000000..3e7522c --- /dev/null +++ b/docs/EditDeadlineOption.md @@ -0,0 +1,10 @@ +# EditDeadlineOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..80a4a66 --- /dev/null +++ b/docs/EditGitHookOption.md @@ -0,0 +1,10 @@ +# EditGitHookOption + +## 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/EditHookOption.md b/docs/EditHookOption.md new file mode 100644 index 0000000..901c0a6 --- /dev/null +++ b/docs/EditHookOption.md @@ -0,0 +1,13 @@ +# EditHookOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..7641825 --- /dev/null +++ b/docs/EditIssueCommentOption.md @@ -0,0 +1,10 @@ +# EditIssueCommentOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..1a77496 --- /dev/null +++ b/docs/EditIssueOption.md @@ -0,0 +1,17 @@ +# EditIssueOption + +## 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] +**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 new file mode 100644 index 0000000..c0322c0 --- /dev/null +++ b/docs/EditLabelOption.md @@ -0,0 +1,12 @@ +# EditLabelOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..d6dba97 --- /dev/null +++ b/docs/EditMilestoneOption.md @@ -0,0 +1,13 @@ +# EditMilestoneOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..ec16abe --- /dev/null +++ b/docs/EditOrgOption.md @@ -0,0 +1,15 @@ +# EditOrgOption + +## 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] + +[[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 new file mode 100644 index 0000000..ba8dbd7 --- /dev/null +++ b/docs/EditPullRequestOption.md @@ -0,0 +1,19 @@ +# EditPullRequestOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assignee** | **str** | | [optional] +**assignees** | **list[str]** | | [optional] +**base** | **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..54de168 --- /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 new file mode 100644 index 0000000..8a29e5a --- /dev/null +++ b/docs/EditReleaseOption.md @@ -0,0 +1,15 @@ +# EditReleaseOption + +## 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] + +[[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 new file mode 100644 index 0000000..9461eb1 --- /dev/null +++ b/docs/EditRepoOption.md @@ -0,0 +1,27 @@ +# EditRepoOption + +## 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] +**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 new file mode 100644 index 0000000..be61541 --- /dev/null +++ b/docs/EditTeamOption.md @@ -0,0 +1,15 @@ +# EditTeamOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..b019d85 --- /dev/null +++ b/docs/EditUserOption.md @@ -0,0 +1,24 @@ +# EditUserOption + +## 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] + +[[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 new file mode 100644 index 0000000..104694e --- /dev/null +++ b/docs/Email.md @@ -0,0 +1,12 @@ +# Email + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..4a68230 --- /dev/null +++ b/docs/ExternalTracker.md @@ -0,0 +1,12 @@ +# ExternalTracker + +## 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] + +[[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 new file mode 100644 index 0000000..461befb --- /dev/null +++ b/docs/ExternalWiki.md @@ -0,0 +1,10 @@ +# ExternalWiki + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..27acbbe --- /dev/null +++ b/docs/FileCommitResponse.md @@ -0,0 +1,17 @@ +# FileCommitResponse + +## 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] + +[[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 new file mode 100644 index 0000000..78cc5c2 --- /dev/null +++ b/docs/FileDeleteResponse.md @@ -0,0 +1,12 @@ +# FileDeleteResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..ab11063 --- /dev/null +++ b/docs/FileLinksResponse.md @@ -0,0 +1,12 @@ +# FileLinksResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..2126c2a --- /dev/null +++ b/docs/FileResponse.md @@ -0,0 +1,12 @@ +# FileResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..264a52e --- /dev/null +++ b/docs/GPGKey.md @@ -0,0 +1,21 @@ +# GPGKey + +## 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] + +[[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 new file mode 100644 index 0000000..25ad93f --- /dev/null +++ b/docs/GPGKeyEmail.md @@ -0,0 +1,11 @@ +# GPGKeyEmail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..656e59a --- /dev/null +++ b/docs/GitBlobResponse.md @@ -0,0 +1,14 @@ +# GitBlobResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..7ebdf32 --- /dev/null +++ b/docs/GitEntry.md @@ -0,0 +1,15 @@ +# GitEntry + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..89d3d9f --- /dev/null +++ b/docs/GitHook.md @@ -0,0 +1,12 @@ +# GitHook + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..5052dd5 --- /dev/null +++ b/docs/GitObject.md @@ -0,0 +1,12 @@ +# GitObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..58b4e3a --- /dev/null +++ b/docs/GitTreeResponse.md @@ -0,0 +1,15 @@ +# GitTreeResponse + +## 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] + +[[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 new file mode 100644 index 0000000..d05a31b --- /dev/null +++ b/docs/Hook.md @@ -0,0 +1,16 @@ +# Hook + +## 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] + +[[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 new file mode 100644 index 0000000..dbef0da --- /dev/null +++ b/docs/Identity.md @@ -0,0 +1,11 @@ +# Identity + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..f026037 --- /dev/null +++ b/docs/InlineResponse200.md @@ -0,0 +1,11 @@ +# InlineResponse200 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..cac11ce --- /dev/null +++ b/docs/InlineResponse2001.md @@ -0,0 +1,11 @@ +# InlineResponse2001 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..098357f --- /dev/null +++ b/docs/InternalTracker.md @@ -0,0 +1,12 @@ +# InternalTracker + +## 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] + +[[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 new file mode 100644 index 0000000..c804258 --- /dev/null +++ b/docs/Issue.md @@ -0,0 +1,30 @@ +# Issue + +## 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] +**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 new file mode 100644 index 0000000..7024407 --- /dev/null +++ b/docs/IssueApi.md @@ -0,0 +1,3809 @@ +# giteapython.IssueApi + +All URIs are relative to *http://localhost/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_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. +[**issue_create_label**](IssueApi.md#issue_create_label) | **POST** /repos/{owner}/{repo}/labels | Create a label +[**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 +[**issue_get_milestones_list**](IssueApi.md#issue_get_milestones_list) | **GET** /repos/{owner}/{repo}/milestones | Get all of a repository's opened milestones +[**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_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** +> list[Label] issue_add_label(owner, repo, index, body=body) + +Add a label to an issue + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 = giteapython.IssueLabelsOption() # IssueLabelsOption | (optional) + +try: + # Add a label to an issue + api_response = api_instance.issue_add_label(owner, repo, index, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_add_label: %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 | + **body** | [**IssueLabelsOption**](IssueLabelsOption.md)| | [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 + - **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_subscription** +> issue_add_subscription(owner, repo, index, user) + +Subscribe user to issue + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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, index, body=body) + +Add tracked time to a issue + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 = giteapython.AddTimeOption() # AddTimeOption | (optional) + +try: + # 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) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the issue | + **body** | [**AddTimeOption**](AddTimeOption.md)| | [optional] + +### Return type + +[**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 + - **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_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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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) + +Remove all labels from an issue + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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: + # Remove all labels from an issue + api_instance.issue_clear_labels(owner, repo, index) +except ApiException as e: + print("Exception when calling IssueApi->issue_clear_labels: %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 + +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) + +# **issue_create_comment** +> Comment issue_create_comment(owner, repo, index, body=body) + +Add a comment to an issue + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 = giteapython.CreateIssueCommentOption() # CreateIssueCommentOption | (optional) + +try: + # Add a comment to an issue + api_response = api_instance.issue_create_comment(owner, repo, index, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_create_comment: %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 | + **body** | [**CreateIssueCommentOption**](CreateIssueCommentOption.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_create_issue** +> Issue issue_create_issue(owner, repo, body=body) + +Create 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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = giteapython.CreateIssueOption() # CreateIssueOption | (optional) + +try: + # Create an issue. If using deadline only the date will be taken into account, and time of day ignored. + api_response = api_instance.issue_create_issue(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_create_issue: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**CreateIssueOption**](CreateIssueOption.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_create_label** +> Label issue_create_label(owner, repo, body=body) + +Create a label + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = giteapython.CreateLabelOption() # CreateLabelOption | (optional) + +try: + # Create a label + api_response = api_instance.issue_create_label(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_create_label: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **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) + +# **issue_create_milestone** +> Milestone issue_create_milestone(owner, repo, body=body) + +Create a milestone + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = giteapython.CreateMilestoneOption() # CreateMilestoneOption | (optional) + +try: + # Create a milestone + api_response = api_instance.issue_create_milestone(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_create_milestone: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**CreateMilestoneOption**](CreateMilestoneOption.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_delete_comment** +> issue_delete_comment(owner, repo, id) + +Delete a comment + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of comment to delete + +try: + # Delete a comment + api_instance.issue_delete_comment(owner, repo, id) +except ApiException as e: + print("Exception when calling IssueApi->issue_delete_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 comment 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) + +# **issue_delete_comment_deprecated** +> issue_delete_comment_deprecated(owner, repo, index, id) + +Delete a comment + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 comment to delete + +try: + # Delete a comment + api_instance.issue_delete_comment_deprecated(owner, repo, index, id) +except ApiException as e: + print("Exception when calling IssueApi->issue_delete_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 comment 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) + +# **issue_delete_comment_reaction** +> issue_delete_comment_reaction(owner, repo, id, content=content) + +Remove a reaction from a comment of an issue + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 +content = giteapython.EditReactionOption() # EditReactionOption | (optional) + +try: + # 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_comment_reaction: %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 | + **content** | [**EditReactionOption**](EditReactionOption.md)| | [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) + +# **issue_delete_issue_reaction** +> issue_delete_issue_reaction(owner, repo, index, content=content) + +Remove a reaction from an issue + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 +content = giteapython.EditReactionOption() # EditReactionOption | (optional) + +try: + # 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_issue_reaction: %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 | + **content** | [**EditReactionOption**](EditReactionOption.md)| | [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) + +# **issue_delete_label** +> issue_delete_label(owner, repo, id) + +Delete a label + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 + +try: + # Delete a label + api_instance.issue_delete_label(owner, repo, id) +except ApiException as e: + print("Exception when calling IssueApi->issue_delete_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 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) + +# **issue_delete_milestone** +> issue_delete_milestone(owner, repo, id) + +Delete a milestone + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 + +try: + # Delete a milestone + api_instance.issue_delete_milestone(owner, repo, id) +except ApiException as e: + print("Exception when calling IssueApi->issue_delete_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 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) + +# **issue_delete_stop_watch** +> issue_delete_stop_watch(owner, repo, index) + +Delete an issue's existing stopwatch. + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 + +try: + # 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_delete_stop_watch: %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 stop the stopwatch on | + +### 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_subscription** +> issue_delete_subscription(owner, repo, index, user) + +Unsubscribe user from issue + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 = giteapython.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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 = giteapython.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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 = giteapython.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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 = giteapython.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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 = giteapython.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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 = giteapython.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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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: + # 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_get_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 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) + +# **issue_get_labels** +> list[Label] issue_get_labels(owner, repo, index) + +Get an issue's labels + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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: + # 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_get_labels: %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 + +[**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) + +# **issue_get_milestone** +> Milestone issue_get_milestone(owner, repo, id) + +Get a milestone + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 + +try: + # 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_get_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 | + +### 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, 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_milestones_list** +> list[Milestone] issue_get_milestones_list(owner, repo, state=state, page=page, limit=limit) + +Get all of a repository's opened milestones + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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) +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 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_milestones_list: %s\n" % e) +``` + +### Parameters + +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] + **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[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, 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_repo_comments** +> list[Comment] issue_get_repo_comments(owner, repo, since=since, before=before, page=page, limit=limit) + +List all comments in a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +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: + # 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_repo_comments: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **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 + +[**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_list_issues** +> list[Issue] issue_list_issues(owner, repo, state=state, labels=labels, q=q, type=type, milestones=milestones, page=page, limit=limit) + +List a repository's issues + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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) +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: + # 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_list_issues: %s\n" % e) +``` + +### Parameters + +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] + **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 + +[**list[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_list_labels** +> list[Label] issue_list_labels(owner, repo, page=page, limit=limit) + +Get all of a repository's labels + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 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_list_labels: %s\n" % e) +``` + +### Parameters + +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 + +[**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) + +# **issue_post_comment_reaction** +> Reaction issue_post_comment_reaction(owner, repo, id, content=content) + +Add a reaction to a comment of an issue + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 +content = giteapython.EditReactionOption() # EditReactionOption | (optional) + +try: + # 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_post_comment_reaction: %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 | + **content** | [**EditReactionOption**](EditReactionOption.md)| | [optional] + +### Return type + +[**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_post_issue_reaction** +> Reaction issue_post_issue_reaction(owner, repo, index, content=content) + +Add a reaction to an issue + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 +content = giteapython.EditReactionOption() # EditReactionOption | (optional) + +try: + # 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_post_issue_reaction: %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 | + **content** | [**EditReactionOption**](EditReactionOption.md)| | [optional] + +### Return type + +[**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_remove_label** +> issue_remove_label(owner, repo, index, id) + +Remove a label from an issue + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 + +try: + # 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_remove_label: %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 | + +### 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) + +# **issue_replace_labels** +> list[Label] issue_replace_labels(owner, repo, index, body=body) + +Replace an issue's labels + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 = giteapython.IssueLabelsOption() # IssueLabelsOption | (optional) + +try: + # 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_replace_labels: %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 | + **body** | [**IssueLabelsOption**](IssueLabelsOption.md)| | [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 + - **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_reset_time** +> issue_reset_time(owner, repo, index) + +Reset a tracked time of an issue + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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: + # 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_reset_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 to add tracked time to | + +### 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_search_issues** +> list[Issue] issue_search_issues(state=state, labels=labels, q=q, priority_repo_id=priority_repo_id, type=type, page=page) + +Search for issues across the repositories that the user has access to + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.ApiClient(configuration)) +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: + # 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_search_issues: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + +[**list[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_start_stop_watch** +> issue_start_stop_watch(owner, repo, index) + +Start stopwatch on an issue. + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 + +try: + # Start stopwatch on an issue. + api_instance.issue_start_stop_watch(owner, repo, index) +except ApiException as e: + print("Exception when calling IssueApi->issue_start_stop_watch: %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 the stopwatch on | + +### 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_stop_stop_watch** +> issue_stop_stop_watch(owner, repo, index) + +Stop an issue's existing stopwatch. + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 + +try: + # 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_stop_stop_watch: %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 stop the stopwatch on | + +### 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_subscriptions** +> list[User] issue_subscriptions(owner, repo, index, page=page, limit=limit) + +Get users who subscribed on an issue. + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 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_subscriptions: %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[User]**](User.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_tracked_times** +> list[TrackedTime] issue_tracked_times(owner, repo, index, since=since, before=before, page=page, limit=limit) + +List an issue's tracked times + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.IssueApi(giteapython.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 | 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, 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) +``` + +### 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**| 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 + +[**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/IssueDeadline.md b/docs/IssueDeadline.md new file mode 100644 index 0000000..962a655 --- /dev/null +++ b/docs/IssueDeadline.md @@ -0,0 +1,10 @@ +# IssueDeadline + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..07f00ff --- /dev/null +++ b/docs/IssueLabelsOption.md @@ -0,0 +1,10 @@ +# IssueLabelsOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..84d41b0 --- /dev/null +++ b/docs/Label.md @@ -0,0 +1,14 @@ +# Label + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..e2f51d6 --- /dev/null +++ b/docs/MarkdownOption.md @@ -0,0 +1,13 @@ +# MarkdownOption + +## 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] + +[[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 new file mode 100644 index 0000000..d6ffc7f --- /dev/null +++ b/docs/MergePullRequestOption.md @@ -0,0 +1,13 @@ +# MergePullRequestOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..feaad92 --- /dev/null +++ b/docs/MigrateRepoForm.md @@ -0,0 +1,23 @@ +# MigrateRepoForm + +## 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] + +[[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 new file mode 100644 index 0000000..1275ee3 --- /dev/null +++ b/docs/Milestone.md @@ -0,0 +1,17 @@ +# Milestone + +## 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] + +[[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/MiscellaneousApi.md b/docs/MiscellaneousApi.md new file mode 100644 index 0000000..d75f8b3 --- /dev/null +++ b/docs/MiscellaneousApi.md @@ -0,0 +1,308 @@ +# giteapython.MiscellaneousApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_signing_key**](MiscellaneousApi.md#get_signing_key) | **GET** /signing-key.gpg | Get default signing-key.gpg +[**get_version**](MiscellaneousApi.md#get_version) | **GET** /version | Returns the version of the Gitea application +[**render_markdown**](MiscellaneousApi.md#render_markdown) | **POST** /markdown | Render a markdown document as HTML +[**render_markdown_raw**](MiscellaneousApi.md#render_markdown_raw) | **POST** /markdown/raw | Render raw markdown as HTML + + +# **get_signing_key** +> str get_signing_key() + +Get default signing-key.gpg + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.MiscellaneousApi(giteapython.ApiClient(configuration)) + +try: + # Get default signing-key.gpg + api_response = api_instance.get_signing_key() + pprint(api_response) +except ApiException as e: + print("Exception when calling MiscellaneousApi->get_signing_key: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**str** + +### 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**: text/plain + +[[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) + +# **get_version** +> ServerVersion get_version() + +Returns the version of the Gitea application + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.MiscellaneousApi(giteapython.ApiClient(configuration)) + +try: + # Returns the version of the Gitea application + api_response = api_instance.get_version() + pprint(api_response) +except ApiException as e: + print("Exception when calling MiscellaneousApi->get_version: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ServerVersion**](ServerVersion.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) + +# **render_markdown** +> str render_markdown(body=body) + +Render a markdown document as HTML + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.MiscellaneousApi(giteapython.ApiClient(configuration)) +body = giteapython.MarkdownOption() # MarkdownOption | (optional) + +try: + # Render a markdown document as HTML + api_response = api_instance.render_markdown(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling MiscellaneousApi->render_markdown: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**MarkdownOption**](MarkdownOption.md)| | [optional] + +### Return type + +**str** + +### 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**: 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) + +# **render_markdown_raw** +> str render_markdown_raw(body) + +Render raw markdown as HTML + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.MiscellaneousApi(giteapython.ApiClient(configuration)) +body = 'body_example' # str | Request body to render + +try: + # Render raw markdown as HTML + api_response = api_instance.render_markdown_raw(body) + pprint(api_response) +except ApiException as e: + print("Exception when calling MiscellaneousApi->render_markdown_raw: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **str**| Request body to render | + +### Return type + +**str** + +### 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**: text/plain + - **Accept**: 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) + diff --git a/docs/NotificationApi.md b/docs/NotificationApi.md new file mode 100644 index 0000000..a4cefe6 --- /dev/null +++ b/docs/NotificationApi.md @@ -0,0 +1,582 @@ +# giteapython.NotificationApi + +All URIs are relative to *http://localhost/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, pinned or unread +[**notify_read_repo_list**](NotificationApi.md#notify_read_repo_list) | **PUT** /repos/{owner}/{repo}/notifications | Mark notification threads as read, pinned or unread 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, status_types=status_types, since=since, before=before, page=page, limit=limit) + +List users's notification threads + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.NotificationApi(giteapython.ApiClient(configuration)) +all = 'all_example' # str | If true, show notifications marked as read. Default value is false (optional) +status_types = ['status_types_example'] # list[str] | Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned. (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, status_types=status_types, 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] + **status_types** | [**list[str]**](str.md)| Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned. | [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, status_types=status_types, 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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.NotificationApi(giteapython.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) +status_types = ['status_types_example'] # list[str] | Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned (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, status_types=status_types, 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] + **status_types** | [**list[str]**](str.md)| Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned | [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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.NotificationApi(giteapython.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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.NotificationApi(giteapython.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, all=all, status_types=status_types, to_status=to_status) + +Mark notification threads as read, pinned or unread + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.NotificationApi(giteapython.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) +all = 'all_example' # str | If true, mark all notifications on this repo. Default value is false (optional) +status_types = ['status_types_example'] # list[str] | Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. (optional) +to_status = 'to_status_example' # str | Status to mark notifications as, Defaults to read. (optional) + +try: + # Mark notification threads as read, pinned or unread + api_instance.notify_read_list(last_read_at=last_read_at, all=all, status_types=status_types, to_status=to_status) +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] + **all** | **str**| If true, mark all notifications on this repo. Default value is false | [optional] + **status_types** | [**list[str]**](str.md)| Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. | [optional] + **to_status** | **str**| Status to mark notifications as, Defaults to read. | [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, all=all, status_types=status_types, to_status=to_status, last_read_at=last_read_at) + +Mark notification threads as read, pinned or unread on a specific repo + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.NotificationApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +all = 'all_example' # str | If true, mark all notifications on this repo. Default value is false (optional) +status_types = ['status_types_example'] # list[str] | Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. (optional) +to_status = 'to_status_example' # str | Status to mark notifications as. Defaults to read. (optional) +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, pinned or unread on a specific repo + api_instance.notify_read_repo_list(owner, repo, all=all, status_types=status_types, to_status=to_status, 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 | + **all** | **str**| If true, mark all notifications on this repo. Default value is false | [optional] + **status_types** | [**list[str]**](str.md)| Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. | [optional] + **to_status** | **str**| Status to mark notifications as. Defaults to read. | [optional] + **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, to_status=to_status) + +Mark notification thread as read by ID + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.NotificationApi(giteapython.ApiClient(configuration)) +id = 'id_example' # str | id of notification thread +to_status = 'read' # str | Status to mark notifications as (optional) (default to read) + +try: + # Mark notification thread as read by ID + api_instance.notify_read_thread(id, to_status=to_status) +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 | + **to_status** | **str**| Status to mark notifications as | [optional] [default to read] + +### 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..095ae5b --- /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..caf8e82 --- /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..9d4bbe8 --- /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..d42e4e3 --- /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 new file mode 100644 index 0000000..5827798 --- /dev/null +++ b/docs/Organization.md @@ -0,0 +1,18 @@ +# Organization + +## 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] + +[[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 new file mode 100644 index 0000000..a300091 --- /dev/null +++ b/docs/OrganizationApi.md @@ -0,0 +1,3179 @@ +# giteapython.OrganizationApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**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 +[**org_list_team_member**](OrganizationApi.md#org_list_team_member) | **GET** /teams/{id}/members/{username} | List a particular member of team +[**org_list_team_members**](OrganizationApi.md#org_list_team_members) | **GET** /teams/{id}/members | List a team's members +[**org_list_team_repos**](OrganizationApi.md#org_list_team_repos) | **GET** /teams/{id}/repos | List a team's repos +[**org_list_teams**](OrganizationApi.md#org_list_teams) | **GET** /orgs/{org}/teams | List an organization's teams +[**org_list_user_orgs**](OrganizationApi.md#org_list_user_orgs) | **GET** /users/{username}/orgs | List a user's organizations +[**org_publicize_member**](OrganizationApi.md#org_publicize_member) | **PUT** /orgs/{org}/public_members/{username} | Publicize a user's membership +[**org_remove_team_member**](OrganizationApi.md#org_remove_team_member) | **DELETE** /teams/{id}/members/{username} | Remove a team member +[**org_remove_team_repository**](OrganizationApi.md#org_remove_team_repository) | **DELETE** /teams/{id}/repos/{org}/{repo} | Remove a repository from a team +[**team_search**](OrganizationApi.md#team_search) | **GET** /orgs/{org}/teams/search | Search for teams within an organization + + +# **create_org_repo** +> Repository create_org_repo(org, body=body) + +Create a repository in an organization + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +org = 'org_example' # str | name of organization +body = giteapython.CreateRepoOption() # CreateRepoOption | (optional) + +try: + # Create a repository in an organization + api_response = api_instance.create_org_repo(org, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->create_org_repo: %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) + +# **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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +org = 'org_example' # str | name of organization +body = giteapython.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) + +Add a team member + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +id = 789 # int | id of the team +username = 'username_example' # str | username of the user to add + +try: + # Add a team member + api_instance.org_add_team_member(id, username) +except ApiException as e: + print("Exception when calling OrganizationApi->org_add_team_member: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the team | + **username** | **str**| username of the user to add | + +### 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) + +# **org_add_team_repository** +> org_add_team_repository(id, org, repo) + +Add a repository to a team + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +id = 789 # int | id of the team +org = 'org_example' # str | organization that owns the repo to add +repo = 'repo_example' # str | name of the repo to add + +try: + # Add a repository to a team + api_instance.org_add_team_repository(id, org, repo) +except ApiException as e: + print("Exception when calling OrganizationApi->org_add_team_repository: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the team | + **org** | **str**| organization that owns the repo to add | + **repo** | **str**| name of the repo to add | + +### 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) + +# **org_conceal_member** +> org_conceal_member(org, username) + +Conceal a user's membership + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +username = 'username_example' # str | username of the user + +try: + # Conceal a user's membership + api_instance.org_conceal_member(org, username) +except ApiException as e: + print("Exception when calling OrganizationApi->org_conceal_member: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **username** | **str**| username of the user | + +### 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) + +# **org_create** +> Organization org_create(organization) + +Create an organization + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +organization = giteapython.CreateOrgOption() # CreateOrgOption | + +try: + # Create an organization + api_response = api_instance.org_create(organization) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_create: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **organization** | [**CreateOrgOption**](CreateOrgOption.md)| | + +### Return type + +[**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 + - **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_hook** +> Hook org_create_hook(org, body) + +Create a hook + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +body = giteapython.CreateHookOption() # CreateHookOption | + +try: + # Create a hook + api_response = api_instance.org_create_hook(org, body) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_create_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **body** | [**CreateHookOption**](CreateHookOption.md)| | + +### 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 + - **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_label** +> Label org_create_label(org, body=body) + +Create a label for an organization + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +body = giteapython.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) + +Create a team + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +body = giteapython.CreateTeamOption() # CreateTeamOption | (optional) + +try: + # Create a team + api_response = api_instance.org_create_team(org, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_create_team: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **body** | [**CreateTeamOption**](CreateTeamOption.md)| | [optional] + +### Return type + +[**Team**](Team.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_delete** +> org_delete(org) + +Delete an organization + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +org = 'org_example' # str | organization that is to be deleted + +try: + # Delete an organization + api_instance.org_delete(org) +except ApiException as e: + print("Exception when calling OrganizationApi->org_delete: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| organization that is 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) + +# **org_delete_hook** +> org_delete_hook(org, id) + +Delete a hook + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +id = 789 # int | id of the hook to delete + +try: + # Delete a hook + api_instance.org_delete_hook(org, id) +except ApiException as e: + print("Exception when calling OrganizationApi->org_delete_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **id** | **int**| id of the hook 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 + +[[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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.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) + +Remove a member from an organization + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +username = 'username_example' # str | username of the user + +try: + # Remove a member from an organization + api_instance.org_delete_member(org, username) +except ApiException as e: + print("Exception when calling OrganizationApi->org_delete_member: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **username** | **str**| username of the user | + +### 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) + +# **org_delete_team** +> org_delete_team(id) + +Delete a team + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +id = 789 # int | id of the team to delete + +try: + # Delete a team + api_instance.org_delete_team(id) +except ApiException as e: + print("Exception when calling OrganizationApi->org_delete_team: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the team 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_edit** +> Organization org_edit(org, body) + +Edit an organization + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +org = 'org_example' # str | name of the organization to edit +body = giteapython.EditOrgOption() # EditOrgOption | + +try: + # Edit an organization + api_response = api_instance.org_edit(org, body) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_edit: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization to edit | + **body** | [**EditOrgOption**](EditOrgOption.md)| | + +### Return type + +[**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 + - **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_hook** +> Hook org_edit_hook(org, id, body=body) + +Update a hook + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +id = 789 # int | id of the hook to update +body = giteapython.EditHookOption() # EditHookOption | (optional) + +try: + # Update a hook + api_response = api_instance.org_edit_hook(org, id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_edit_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **id** | **int**| id of the hook to update | + **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 + - **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_label** +> Label org_edit_label(org, id, body=body) + +Update a label + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +id = 789 # int | id of the label to edit +body = giteapython.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) + +Edit a team + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +id = 56 # int | id of the team to edit +body = giteapython.EditTeamOption() # EditTeamOption | (optional) + +try: + # Edit a team + api_response = api_instance.org_edit_team(id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_edit_team: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the team to edit | + **body** | [**EditTeamOption**](EditTeamOption.md)| | [optional] + +### Return type + +[**Team**](Team.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_get** +> Organization org_get(org) + +Get an organization + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +org = 'org_example' # str | name of the organization to get + +try: + # Get an organization + api_response = api_instance.org_get(org) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_get: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization to get | + +### Return type + +[**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_all** +> list[Organization] org_get_all(page=page, limit=limit) + +Get list of organizations + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.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) + +Get a hook + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +id = 789 # int | id of the hook to get + +try: + # Get a hook + api_response = api_instance.org_get_hook(org, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_get_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **id** | **int**| id of the hook to get | + +### 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) + +# **org_get_label** +> Label org_get_label(org, id) + +Get a single label + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.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) + +Get a team + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +id = 789 # int | id of the team to get + +try: + # Get a team + api_response = api_instance.org_get_team(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_get_team: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the team to get | + +### Return type + +[**Team**](Team.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_is_member** +> org_is_member(org, username) + +Check if a user is a member of an organization + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +username = 'username_example' # str | username of the user + +try: + # Check if a user is a member of an organization + api_instance.org_is_member(org, username) +except ApiException as e: + print("Exception when calling OrganizationApi->org_is_member: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **username** | **str**| username of the user | + +### 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_is_public_member** +> org_is_public_member(org, username) + +Check if a user is a public member of an organization + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +username = 'username_example' # str | username of the user + +try: + # Check if a user is a public member of an organization + api_instance.org_is_public_member(org, username) +except ApiException as e: + print("Exception when calling OrganizationApi->org_is_public_member: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **username** | **str**| username of the user | + +### 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_list_current_user_orgs** +> list[Organization] org_list_current_user_orgs(page=page, limit=limit) + +List the current user's organizations + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.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(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 + +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_list_hooks** +> list[Hook] org_list_hooks(org, page=page, limit=limit) + +List an organization's webhooks + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_hooks: %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[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) + +# **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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.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, page=page, limit=limit) + +List an organization's members + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_members: %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[User]**](User.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_public_members** +> list[User] org_list_public_members(org, page=page, limit=limit) + +List an organization's public members + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_public_members: %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[User]**](User.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_repos** +> list[Repository] org_list_repos(org, page=page, limit=limit) + +List an organization's repos + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_repos: %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[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) + +# **org_list_team_member** +> User org_list_team_member(id, username) + +List a particular member of team + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +id = 789 # int | id of the team +username = 'username_example' # str | username of the member to list + +try: + # List a particular member of team + api_response = api_instance.org_list_team_member(id, username) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_team_member: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the team | + **username** | **str**| username of the member to list | + +### Return type + +[**User**](User.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_team_members** +> list[User] org_list_team_members(id, page=page, limit=limit) + +List a team's members + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_team_members: %s\n" % e) +``` + +### Parameters + +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 + +[**list[User]**](User.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_team_repos** +> list[Repository] org_list_team_repos(id, page=page, limit=limit) + +List a team's repos + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_team_repos: %s\n" % e) +``` + +### Parameters + +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 + +[**list[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) + +# **org_list_teams** +> list[Team] org_list_teams(org, page=page, limit=limit) + +List an organization's teams + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_teams: %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[Team]**](Team.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_user_orgs** +> list[Organization] org_list_user_orgs(username, page=page, limit=limit) + +List a user's organizations + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_user_orgs: %s\n" % e) +``` + +### Parameters + +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 + +[**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_publicize_member** +> org_publicize_member(org, username) + +Publicize a user's membership + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +username = 'username_example' # str | username of the user + +try: + # Publicize a user's membership + api_instance.org_publicize_member(org, username) +except ApiException as e: + print("Exception when calling OrganizationApi->org_publicize_member: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **username** | **str**| username of the user | + +### 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) + +# **org_remove_team_member** +> org_remove_team_member(id, username) + +Remove a team member + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +id = 789 # int | id of the team +username = 'username_example' # str | username of the user to remove + +try: + # Remove a team member + api_instance.org_remove_team_member(id, username) +except ApiException as e: + print("Exception when calling OrganizationApi->org_remove_team_member: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the team | + **username** | **str**| username of the user to remove | + +### 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) + +# **org_remove_team_repository** +> org_remove_team_repository(id, org, repo) + +Remove a repository from a team + +This does not delete the repository, it only removes the repository from the team. + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.ApiClient(configuration)) +id = 789 # int | id of the team +org = 'org_example' # str | organization that owns the repo to remove +repo = 'repo_example' # str | name of the repo to remove + +try: + # Remove a repository from a team + api_instance.org_remove_team_repository(id, org, repo) +except ApiException as e: + print("Exception when calling OrganizationApi->org_remove_team_repository: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the team | + **org** | **str**| organization that owns the repo to remove | + **repo** | **str**| name of the repo to remove | + +### 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) + +# **team_search** +> InlineResponse200 team_search(org, q=q, include_desc=include_desc, page=page, limit=limit) + +Search for teams within an organization + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.OrganizationApi(giteapython.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) +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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->team_search: %s\n" % e) +``` + +### Parameters + +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] + **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 + +[**InlineResponse200**](InlineResponse200.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/PRBranchInfo.md b/docs/PRBranchInfo.md new file mode 100644 index 0000000..a62f2f7 --- /dev/null +++ b/docs/PRBranchInfo.md @@ -0,0 +1,14 @@ +# PRBranchInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..aadcb9d --- /dev/null +++ b/docs/PayloadCommit.md @@ -0,0 +1,19 @@ +# PayloadCommit + +## 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] + +[[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 new file mode 100644 index 0000000..7380798 --- /dev/null +++ b/docs/PayloadCommitVerification.md @@ -0,0 +1,14 @@ +# PayloadCommitVerification + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..7189554 --- /dev/null +++ b/docs/PayloadUser.md @@ -0,0 +1,12 @@ +# PayloadUser + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..123f583 --- /dev/null +++ b/docs/Permission.md @@ -0,0 +1,12 @@ +# Permission + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..b6ba83d --- /dev/null +++ b/docs/PublicKey.md @@ -0,0 +1,18 @@ +# PublicKey + +## 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] + +[[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 new file mode 100644 index 0000000..7eb1569 --- /dev/null +++ b/docs/PullRequest.md @@ -0,0 +1,36 @@ +# PullRequest + +## 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] + +[[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 new file mode 100644 index 0000000..53ba426 --- /dev/null +++ b/docs/PullRequestMeta.md @@ -0,0 +1,11 @@ +# PullRequestMeta + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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..1d0abff --- /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..b76e3b1 --- /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..ce1bc2a --- /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 new file mode 100644 index 0000000..c31e370 --- /dev/null +++ b/docs/Reference.md @@ -0,0 +1,12 @@ +# Reference + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..23086ea --- /dev/null +++ b/docs/Release.md @@ -0,0 +1,24 @@ +# Release + +## 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] +**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 new file mode 100644 index 0000000..b826fb7 --- /dev/null +++ b/docs/RepoCommit.md @@ -0,0 +1,14 @@ +# RepoCommit + +## 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] + +[[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 new file mode 100644 index 0000000..44a62b9 --- /dev/null +++ b/docs/RepoTopicOptions.md @@ -0,0 +1,10 @@ +# RepoTopicOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..3cce76f --- /dev/null +++ b/docs/Repository.md @@ -0,0 +1,49 @@ +# Repository + +## 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] +**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 new file mode 100644 index 0000000..93d95ea --- /dev/null +++ b/docs/RepositoryApi.md @@ -0,0 +1,7462 @@ +# giteapython.RepositoryApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_current_user_repo**](RepositoryApi.md#create_current_user_repo) | **POST** /user/repos | Create a repository +[**create_fork**](RepositoryApi.md#create_fork) | **POST** /repos/{owner}/{repo}/forks | Fork a repository +[**get_blob**](RepositoryApi.md#get_blob) | **GET** /repos/{owner}/{repo}/git/blobs/{sha} | Gets the blob of a repository. +[**get_tag**](RepositoryApi.md#get_tag) | **GET** /repos/{owner}/{repo}/git/tags/{sha} | Gets the tag object of an annotated tag (not lightweight tags) +[**get_tree**](RepositoryApi.md#get_tree) | **GET** /repos/{owner}/{repo}/git/trees/{sha} | Gets the tree of a repository. +[**list_forks**](RepositoryApi.md#list_forks) | **GET** /repos/{owner}/{repo}/forks | List a repository's forks +[**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. 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, 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 +[**repo_get_contents_list**](RepositoryApi.md#repo_get_contents_list) | **GET** /repos/{owner}/{repo}/contents | Gets the metadata of all the entries of the root dir +[**repo_get_editor_config**](RepositoryApi.md#repo_get_editor_config) | **GET** /repos/{owner}/{repo}/editorconfig/{filepath} | Get the EditorConfig definitions of a file in a repository +[**repo_get_git_hook**](RepositoryApi.md#repo_get_git_hook) | **GET** /repos/{owner}/{repo}/hooks/git/{id} | Get a Git hook +[**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_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 +[**repo_list_git_refs**](RepositoryApi.md#repo_list_git_refs) | **GET** /repos/{owner}/{repo}/git/refs/{ref} | Get specified ref or filtered repository's refs +[**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 +[**repo_list_statuses**](RepositoryApi.md#repo_list_statuses) | **GET** /repos/{owner}/{repo}/statuses/{sha} | Get a commit's statuses +[**repo_list_subscribers**](RepositoryApi.md#repo_list_subscribers) | **GET** /repos/{owner}/{repo}/subscribers | List a repo's watchers +[**repo_list_tags**](RepositoryApi.md#repo_list_tags) | **GET** /repos/{owner}/{repo}/tags | List a repository's tags +[**repo_list_topics**](RepositoryApi.md#repo_list_topics) | **GET** /repos/{owner}/{repo}/topics | Get list of topics that a repository has +[**repo_merge_pull_request**](RepositoryApi.md#repo_merge_pull_request) | **POST** /repos/{owner}/{repo}/pulls/{index}/merge | Merge a pull request +[**repo_migrate**](RepositoryApi.md#repo_migrate) | **POST** /repos/migrate | Migrate a remote git repository +[**repo_mirror_sync**](RepositoryApi.md#repo_mirror_sync) | **POST** /repos/{owner}/{repo}/mirror-sync | Sync a mirrored repository +[**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** +> Repository create_current_user_repo(body=body) + +Create a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +body = giteapython.CreateRepoOption() # CreateRepoOption | (optional) + +try: + # Create a repository + api_response = api_instance.create_current_user_repo(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->create_current_user_repo: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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) + +# **create_fork** +> Repository create_fork(owner, repo, body=body) + +Fork a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo to fork +repo = 'repo_example' # str | name of the repo to fork +body = giteapython.CreateForkOption() # CreateForkOption | (optional) + +try: + # Fork a repository + api_response = api_instance.create_fork(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->create_fork: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo to fork | + **repo** | **str**| name of the repo to fork | + **body** | [**CreateForkOption**](CreateForkOption.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, 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) + +# **get_blob** +> GitBlobResponse get_blob(owner, repo, sha) + +Gets the blob of a repository. + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 + +try: + # Gets the blob of a repository. + api_response = api_instance.get_blob(owner, repo, sha) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->get_blob: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **sha** | **str**| sha of the commit | + +### Return type + +[**GitBlobResponse**](GitBlobResponse.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) + +# **get_tag** +> AnnotatedTag get_tag(owner, repo, sha) + +Gets the tag object of an annotated tag (not lightweight tags) + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 tag. The Git tags API only supports annotated tag objects, not lightweight tags. + +try: + # Gets the tag object of an annotated tag (not lightweight tags) + api_response = api_instance.get_tag(owner, repo, sha) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->get_tag: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **sha** | **str**| sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags. | + +### Return type + +[**AnnotatedTag**](AnnotatedTag.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) + +# **get_tree** +> GitTreeResponse get_tree(owner, repo, sha, recursive=recursive, page=page, per_page=per_page) + +Gets the tree of a repository. + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 +recursive = true # bool | show all directories and files (optional) +page = 56 # int | page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page (optional) +per_page = 56 # int | number of items per page; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE (optional) + +try: + # Gets the tree of a repository. + api_response = api_instance.get_tree(owner, repo, sha, recursive=recursive, page=page, per_page=per_page) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->get_tree: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **sha** | **str**| sha of the commit | + **recursive** | **bool**| show all directories and files | [optional] + **page** | **int**| page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page | [optional] + **per_page** | **int**| number of items per page; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE | [optional] + +### Return type + +[**GitTreeResponse**](GitTreeResponse.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) + +# **list_forks** +> list[Repository] list_forks(owner, repo, page=page, limit=limit) + +List a repository's forks + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->list_forks: %s\n" % e) +``` + +### Parameters + +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 + +[**list[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_add_collaborator** +> repo_add_collaborator(owner, repo, collaborator, body=body) + +Add a collaborator to a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 add +body = giteapython.AddCollaboratorOption() # AddCollaboratorOption | (optional) + +try: + # Add a collaborator to a repository + api_instance.repo_add_collaborator(owner, repo, collaborator, body=body) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_add_collaborator: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **collaborator** | **str**| username of the collaborator to add | + **body** | [**AddCollaboratorOption**](AddCollaboratorOption.md)| | [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, 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_add_topc** +> repo_add_topc(owner, repo, topic) + +Add a topic to a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +topic = 'topic_example' # str | name of the topic to add + +try: + # Add a topic to a repository + api_instance.repo_add_topc(owner, repo, topic) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_add_topc: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **topic** | **str**| name of the topic to add | + +### 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_check_collaborator** +> repo_check_collaborator(owner, repo, collaborator) + +Check if a user is a collaborator of a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 + +try: + # Check if a user is a collaborator of a repository + api_instance.repo_check_collaborator(owner, repo, collaborator) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_check_collaborator: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **collaborator** | **str**| username of the collaborator | + +### 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_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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = giteapython.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) + +Create a file in a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 create +body = giteapython.CreateFileOptions() # CreateFileOptions | + +try: + # Create a file in a repository + api_response = api_instance.repo_create_file(owner, repo, filepath, body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_create_file: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **filepath** | **str**| path of the file to create | + **body** | [**CreateFileOptions**](CreateFileOptions.md)| | + +### Return type + +[**FileResponse**](FileResponse.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_hook** +> Hook repo_create_hook(owner, repo, body=body) + +Create a hook + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = giteapython.CreateHookOption() # CreateHookOption | (optional) + +try: + # Create a hook + api_response = api_instance.repo_create_hook(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_create_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**CreateHookOption**](CreateHookOption.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 + - **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_key** +> DeployKey repo_create_key(owner, repo, body=body) + +Add a key to a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = giteapython.CreateKeyOption() # CreateKeyOption | (optional) + +try: + # Add a key to a repository + api_response = api_instance.repo_create_key(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_create_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**CreateKeyOption**](CreateKeyOption.md)| | [optional] + +### Return type + +[**DeployKey**](DeployKey.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_pull_request** +> PullRequest repo_create_pull_request(owner, repo, body=body) + +Create a pull request + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = giteapython.CreatePullRequestOption() # CreatePullRequestOption | (optional) + +try: + # Create a pull request + api_response = api_instance.repo_create_pull_request(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_create_pull_request: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**CreatePullRequestOption**](CreatePullRequestOption.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_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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 = giteapython.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) + +Create a release + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = giteapython.CreateReleaseOption() # CreateReleaseOption | (optional) + +try: + # Create a release + api_response = api_instance.repo_create_release(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_create_release: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**CreateReleaseOption**](CreateReleaseOption.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_create_release_attachment** +> Attachment repo_create_release_attachment(owner, repo, id, attachment, name=name) + +Create a release attachment + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 = '/path/to/file.txt' # file | attachment to upload +name = 'name_example' # str | name of the attachment (optional) + +try: + # Create a release attachment + api_response = api_instance.repo_create_release_attachment(owner, repo, id, attachment, name=name) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_create_release_attachment: %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 | + **attachment** | **file**| attachment to upload | + **name** | **str**| name of the attachment | [optional] + +### Return type + +[**Attachment**](Attachment.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**: multipart/form-data + - **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_status** +> Status repo_create_status(owner, repo, sha, body=body) + +Create a commit status + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 +body = giteapython.CreateStatusOption() # CreateStatusOption | (optional) + +try: + # Create a commit status + api_response = api_instance.repo_create_status(owner, repo, sha, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_create_status: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **sha** | **str**| sha of the commit | + **body** | [**CreateStatusOption**](CreateStatusOption.md)| | [optional] + +### Return type + +[**Status**](Status.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_delete** +> repo_delete(owner, repo) + +Delete a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo to delete +repo = 'repo_example' # str | name of the repo to delete + +try: + # Delete a repository + api_instance.repo_delete(owner, repo) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo to delete | + **repo** | **str**| name of the repo 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 + +[[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_branch** +> repo_delete_branch(owner, repo, branch) + +Delete a specific branch from a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +branch = 'branch_example' # str | branch to delete + +try: + # 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_branch: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **branch** | **str**| branch 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 + +[[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_branch_protection** +> repo_delete_branch_protection(owner, repo, name) + +Delete a specific branch protection for the repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 + +try: + # 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_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 | + +### 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_collaborator** +> repo_delete_collaborator(owner, repo, collaborator) + +Delete a collaborator from a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 + +try: + # 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_collaborator: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **collaborator** | **str**| username of the collaborator 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 + +[[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) + +Delete a file in a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 = giteapython.DeleteFileOptions() # DeleteFileOptions | + +try: + # 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_file: %s\n" % e) +``` + +### Parameters + +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)| | + +### Return type + +[**FileDeleteResponse**](FileDeleteResponse.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_delete_git_hook** +> repo_delete_git_hook(owner, repo, id) + +Delete a Git hook in a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 + +try: + # 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_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 | + +### 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_hook** +> repo_delete_hook(owner, repo, id) + +Delete a hook in a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 + +try: + # 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_hook: %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 hook 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 + +[[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) + +Delete a key from a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 + +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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 + api_instance.repo_delete_release_attachment(owner, repo, id, attachment_id) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete_release_attachment: %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 | + **attachment_id** | **int**| id of the attachment 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 + +[[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_topic** +> repo_delete_topic(owner, repo, topic) + +Delete a topic from a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +topic = 'topic_example' # str | name of the topic to delete + +try: + # Delete a topic from a repository + api_instance.repo_delete_topic(owner, repo, topic) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete_topic: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **topic** | **str**| name of the topic 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 + +[[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** +> Repository repo_edit(owner, repo, body=body) + +Edit a repository's properties. Only fields that are set will be changed. + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo to edit +repo = 'repo_example' # str | name of the repo to edit +body = giteapython.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) + 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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 = giteapython.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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 = giteapython.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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 = giteapython.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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 = giteapython.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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 = giteapython.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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 = giteapython.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_release_attachment: %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 | + **attachment_id** | **int**| id of the attachment to edit | + **body** | [**EditAttachmentOptions**](EditAttachmentOptions.md)| | [optional] + +### Return type + +[**Attachment**](Attachment.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_get** +> Repository repo_get(owner, repo) + +Get a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Get a repository + api_response = api_instance.repo_get(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### 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_get_all_commits** +> list[Commit] repo_get_all_commits(owner, repo, sha=sha, page=page, limit=limit) + +Get a list of all commits from a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (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, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_all_commits: %s\n" % e) +``` + +### Parameters + +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 results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] + +### Return type + +[**list[Commit]**](Commit.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_get_archive** +> repo_get_archive(owner, repo, archive) + +Get an archive of a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 + +try: + # Get an archive of a repository + api_instance.repo_get_archive(owner, repo, archive) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_archive: %s\n" % e) +``` + +### Parameters + +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 | + +### 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_get_branch** +> Branch repo_get_branch(owner, repo, branch) + +Retrieve a specific branch from a repository, including its effective branch protection + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 + +try: + # 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_get_branch: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **branch** | **str**| branch to get | + +### Return type + +[**Branch**](Branch.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_get_branch_protection** +> BranchProtection repo_get_branch_protection(owner, repo, name) + +Get a specific branch protection for the repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 + +try: + # 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_get_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 | + +### 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, 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_by_id** +> Repository repo_get_by_id(id) + +Get a repository by id + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +id = 789 # int | id of the repo to get + +try: + # 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_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of the repo to get | + +### 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_get_combined_status_by_ref** +> Status repo_get_combined_status_by_ref(owner, repo, ref, page=page) + +Get a commit's combined status, by branch/tag/commit reference + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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) + +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) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_combined_status_by_ref: %s\n" % e) +``` + +### Parameters + +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] + +### Return type + +[**Status**](Status.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_get_contents** +> ContentsResponse repo_get_contents(owner, repo, filepath, ref=ref) + +Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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) + +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) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_contents: %s\n" % e) +``` + +### Parameters + +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] + +### Return type + +[**ContentsResponse**](ContentsResponse.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_get_contents_list** +> list[ContentsResponse] repo_get_contents_list(owner, repo, ref=ref) + +Gets the metadata of all the entries of the root dir + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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) + +try: + # 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_contents_list: %s\n" % e) +``` + +### Parameters + +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] + +### Return type + +[**list[ContentsResponse]**](ContentsResponse.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_get_editor_config** +> repo_get_editor_config(owner, repo, filepath) + +Get the EditorConfig definitions of a file in a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 + +try: + # 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_editor_config: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **filepath** | **str**| filepath of file to get | + +### 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_get_git_hook** +> GitHook repo_get_git_hook(owner, repo, id) + +Get a Git hook + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 + +try: + # 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_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 | + +### 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_get_hook** +> Hook repo_get_hook(owner, repo, id) + +Get a hook + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 + +try: + # 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_hook: %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 hook to get | + +### 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_get_key** +> DeployKey repo_get_key(owner, repo, id) + +Get a repository's key by id + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 + +try: + # 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_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 get | + +### Return type + +[**DeployKey**](DeployKey.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_get_pull_request** +> PullRequest repo_get_pull_request(owner, repo, index) + +Get a pull request + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 + +try: + # 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_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 get | + +### 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, 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_pull_review** +> PullReview repo_get_pull_review(owner, repo, index, id) + +Get a specific review for a pull request + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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: + # 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_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 + +[**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_get_pull_review_comments** +> list[PullReviewComment] repo_get_pull_review_comments(owner, repo, index, id) + +Get a specific review for a pull request + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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: + # 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_pull_review_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 pull request | + **id** | **int**| id of the review | + +### Return type + +[**list[PullReviewComment]**](PullReviewComment.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_get_raw_file** +> repo_get_raw_file(owner, repo, filepath) + +Get a file from a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 + +try: + # 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_raw_file: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **filepath** | **str**| filepath of the file to get | + +### 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_get_release** +> Release repo_get_release(owner, repo, id) + +Get a release + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 + +try: + # 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_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 get | + +### 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, 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_release_attachment** +> Attachment repo_get_release_attachment(owner, repo, id, attachment_id) + +Get a release attachment + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 + +try: + # 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_release_attachment: %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 | + **attachment_id** | **int**| id of the attachment to get | + +### Return type + +[**Attachment**](Attachment.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_get_single_commit** +> Commit repo_get_single_commit(owner, repo, sha) + +Get a single commit from a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +sha = 'sha_example' # str | a git ref or commit sha + +try: + # Get a single commit from a repository + api_response = api_instance.repo_get_single_commit(owner, repo, sha) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_get_single_commit: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **sha** | **str**| a git ref or commit sha | + +### Return type + +[**Commit**](Commit.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_all_git_refs** +> list[Reference] repo_list_all_git_refs(owner, repo) + +Get specified ref or filtered repository's refs + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +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) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_all_git_refs: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**list[Reference]**](Reference.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_branch_protection** +> list[BranchProtection] repo_list_branch_protection(owner, repo) + +List branch protections for a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # 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_branch_protection: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**list[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, 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_branches** +> list[Branch] repo_list_branches(owner, repo) + +List a repository's branches + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # List a repository's branches + api_response = api_instance.repo_list_branches(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_branches: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**list[Branch]**](Branch.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_collaborators** +> list[User] repo_list_collaborators(owner, repo, page=page, limit=limit) + +List a repository's collaborators + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_collaborators: %s\n" % e) +``` + +### Parameters + +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 + +[**list[User]**](User.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_git_hooks** +> list[GitHook] repo_list_git_hooks(owner, repo) + +List the Git hooks in a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # List the Git hooks in a repository + api_response = api_instance.repo_list_git_hooks(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_git_hooks: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +[**list[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_list_git_refs** +> list[Reference] repo_list_git_refs(owner, repo, ref) + +Get specified ref or filtered repository's refs + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +ref = 'ref_example' # str | part or full name of the ref + +try: + # Get specified ref or filtered repository's refs + api_response = api_instance.repo_list_git_refs(owner, repo, ref) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_git_refs: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **ref** | **str**| part or full name of the ref | + +### Return type + +[**list[Reference]**](Reference.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_hooks** +> list[Hook] repo_list_hooks(owner, repo, page=page, limit=limit) + +List the hooks in a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_hooks: %s\n" % e) +``` + +### Parameters + +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 + +[**list[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_list_keys** +> list[DeployKey] repo_list_keys(owner, repo, key_id=key_id, fingerprint=fingerprint, page=page, limit=limit) + +List a repository's keys + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_keys: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **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 + +[**list[DeployKey]**](DeployKey.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_requests** +> 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 + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +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, 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) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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[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_list_release_attachments** +> list[Attachment] repo_list_release_attachments(owner, repo, id) + +List release's attachments + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 + +try: + # List release's attachments + api_response = api_instance.repo_list_release_attachments(owner, repo, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_release_attachments: %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 | + +### Return type + +[**list[Attachment]**](Attachment.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_releases** +> list[Release] repo_list_releases(owner, repo, per_page=per_page, page=page, limit=limit) + +List a repo's releases + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +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, 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) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **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 + +[**list[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, 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_stargazers** +> list[User] repo_list_stargazers(owner, repo, page=page, limit=limit) + +List a repo's stargazers + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_stargazers: %s\n" % e) +``` + +### Parameters + +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 + +[**list[User]**](User.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_statuses** +> list[Status] repo_list_statuses(owner, repo, sha, sort=sort, state=state, page=page, limit=limit) + +Get a commit's statuses + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 +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, 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) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **sha** | **str**| sha of the commit | + **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 + +[**list[Status]**](Status.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_subscribers** +> list[User] repo_list_subscribers(owner, repo, page=page, limit=limit) + +List a repo's watchers + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_subscribers: %s\n" % e) +``` + +### Parameters + +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 + +[**list[User]**](User.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_tags** +> list[Tag] repo_list_tags(owner, repo, page=page, limit=limit) + +List a repository's tags + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_tags: %s\n" % e) +``` + +### Parameters + +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 + +[**list[Tag]**](Tag.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_topics** +> TopicName repo_list_topics(owner, repo, page=page, limit=limit) + +Get list of topics that a repository has + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_topics: %s\n" % e) +``` + +### Parameters + +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 + +[**TopicName**](TopicName.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_merge_pull_request** +> repo_merge_pull_request(owner, repo, index, body=body) + +Merge a pull request + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 merge +body = giteapython.MergePullRequestOption() # MergePullRequestOption | (optional) + +try: + # Merge a pull request + api_instance.repo_merge_pull_request(owner, repo, index, body=body) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_merge_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 merge | + **body** | [**MergePullRequestOption**](MergePullRequestOption.md)| | [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, 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_migrate** +> Repository repo_migrate(body=body) + +Migrate a remote git repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +body = giteapython.MigrateRepoForm() # MigrateRepoForm | (optional) + +try: + # Migrate a remote git repository + api_response = api_instance.repo_migrate(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_migrate: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**MigrateRepoForm**](MigrateRepoForm.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) + +# **repo_mirror_sync** +> repo_mirror_sync(owner, repo) + +Sync a mirrored repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo to sync +repo = 'repo_example' # str | name of the repo to sync + +try: + # Sync a mirrored repository + api_instance.repo_mirror_sync(owner, repo) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_mirror_sync: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo to sync | + **repo** | **str**| name of the repo to sync | + +### 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_pull_request_is_merged** +> repo_pull_request_is_merged(owner, repo, index) + +Check if a pull request has been merged + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 + +try: + # Check if a pull request has been merged + api_instance.repo_pull_request_is_merged(owner, repo, index) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_pull_request_is_merged: %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 | + +### 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_search** +> 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, is_private=is_private, template=template, archived=archived, mode=mode, exclusive=exclusive, sort=sort, order=order, page=page, limit=limit) + +Search for repositories + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +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) +is_private = true # bool | show only pubic, private or all repositories (defaults to all) (optional) +template = true # bool | include template repositories this user has access to (defaults to true) (optional) +archived = true # bool | show only archived, non-archived or all repositories (defaults to all) (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, priority_owner_id=priority_owner_id, starred_by=starred_by, private=private, is_private=is_private, template=template, archived=archived, 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) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **q** | **str**| keyword | [optional] + **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] + **is_private** | **bool**| show only pubic, private or all repositories (defaults to all) | [optional] + **template** | **bool**| include template repositories this user has access to (defaults to true) | [optional] + **archived** | **bool**| show only archived, non-archived or all repositories (defaults to all) | [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 + +[**SearchResults**](SearchResults.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_signing_key** +> str repo_signing_key(owner, repo) + +Get signing-key.gpg for given repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Get signing-key.gpg for given repository + api_response = api_instance.repo_signing_key(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_signing_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### Return type + +**str** + +### 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**: text/plain + +[[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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 = giteapython.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) + +Test a push webhook + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 test + +try: + # Test a push webhook + api_instance.repo_test_hook(owner, repo, id) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_test_hook: %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 hook to test | + +### 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_tracked_times** +> list[TrackedTime] repo_tracked_times(owner, repo, user=user, since=since, before=before, page=page, limit=limit) + +List a repo's tracked times + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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, 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) +``` + +### Parameters + +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 + +[**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) + +# **repo_transfer** +> Repository repo_transfer(owner, repo, body) + +Transfer a repo ownership + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo to transfer +repo = 'repo_example' # str | name of the repo to transfer +body = giteapython.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) + +Update a file in a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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 update +body = giteapython.UpdateFileOptions() # UpdateFileOptions | + +try: + # Update a file in a repository + api_response = api_instance.repo_update_file(owner, repo, filepath, body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_update_file: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **filepath** | **str**| path of the file to update | + **body** | [**UpdateFileOptions**](UpdateFileOptions.md)| | + +### Return type + +[**FileResponse**](FileResponse.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_update_topics** +> repo_update_topics(owner, repo, body=body) + +Replace list of topics for a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = giteapython.RepoTopicOptions() # RepoTopicOptions | (optional) + +try: + # Replace list of topics for a repository + api_instance.repo_update_topics(owner, repo, body=body) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_update_topics: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**RepoTopicOptions**](RepoTopicOptions.md)| | [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, 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) + +# **topic_search** +> list[TopicResponse] topic_search(q, page=page, limit=limit) + +search topics via keyword + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->topic_search: %s\n" % e) +``` + +### Parameters + +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 + +[**list[TopicResponse]**](TopicResponse.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_current_check_subscription** +> WatchInfo user_current_check_subscription(owner, repo) + +Check if the current user is watching a repo + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Check if the current user is watching a repo + api_response = api_instance.user_current_check_subscription(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->user_current_check_subscription: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### 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, 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) + +# **user_current_delete_subscription** +> user_current_delete_subscription(owner, repo) + +Unwatch a repo + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Unwatch a repo + api_instance.user_current_delete_subscription(owner, repo) +except ApiException as e: + print("Exception when calling RepositoryApi->user_current_delete_subscription: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### 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) + +# **user_current_put_subscription** +> WatchInfo user_current_put_subscription(owner, repo) + +Watch a repo + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Watch a repo + api_response = api_instance.user_current_put_subscription(owner, repo) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->user_current_put_subscription: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### 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, 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) + +# **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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.RepositoryApi(giteapython.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..b55d458 --- /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 new file mode 100644 index 0000000..876e635 --- /dev/null +++ b/docs/SearchResults.md @@ -0,0 +1,11 @@ +# SearchResults + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..76b84cd --- /dev/null +++ b/docs/ServerVersion.md @@ -0,0 +1,10 @@ +# ServerVersion + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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/StateType.md b/docs/StateType.md new file mode 100644 index 0000000..4ba45d2 --- /dev/null +++ b/docs/StateType.md @@ -0,0 +1,9 @@ +# StateType + +## 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/Status.md b/docs/Status.md new file mode 100644 index 0000000..98c4d4c --- /dev/null +++ b/docs/Status.md @@ -0,0 +1,18 @@ +# Status + +## 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] + +[[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/StatusState.md b/docs/StatusState.md new file mode 100644 index 0000000..c676f43 --- /dev/null +++ b/docs/StatusState.md @@ -0,0 +1,9 @@ +# StatusState + +## 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/StopWatch.md b/docs/StopWatch.md new file mode 100644 index 0000000..f699ca0 --- /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..ce1dbd7 --- /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 new file mode 100644 index 0000000..08fd49b --- /dev/null +++ b/docs/Tag.md @@ -0,0 +1,14 @@ +# Tag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..3dd9446 --- /dev/null +++ b/docs/Team.md @@ -0,0 +1,17 @@ +# Team + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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/TimeStamp.md b/docs/TimeStamp.md new file mode 100644 index 0000000..77f4b28 --- /dev/null +++ b/docs/TimeStamp.md @@ -0,0 +1,9 @@ +# TimeStamp + +## 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/TopicName.md b/docs/TopicName.md new file mode 100644 index 0000000..ca4b554 --- /dev/null +++ b/docs/TopicName.md @@ -0,0 +1,10 @@ +# TopicName + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..1014faf --- /dev/null +++ b/docs/TopicResponse.md @@ -0,0 +1,14 @@ +# TopicResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..26521f6 --- /dev/null +++ b/docs/TrackedTime.md @@ -0,0 +1,16 @@ +# TrackedTime + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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..a8599fe --- /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 new file mode 100644 index 0000000..7e8e6b9 --- /dev/null +++ b/docs/UpdateFileOptions.md @@ -0,0 +1,18 @@ +# UpdateFileOptions + +## 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 | +**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 new file mode 100644 index 0000000..217bd69 --- /dev/null +++ b/docs/User.md @@ -0,0 +1,18 @@ +# User + +## 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] + +[[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 new file mode 100644 index 0000000..d0011de --- /dev/null +++ b/docs/UserApi.md @@ -0,0 +1,3607 @@ +# giteapython.UserApi + +All URIs are relative to *http://localhost/api/v1* + +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 +[**user_current_delete_follow**](UserApi.md#user_current_delete_follow) | **DELETE** /user/following/{username} | Unfollow a user +[**user_current_delete_gpg_key**](UserApi.md#user_current_delete_gpg_key) | **DELETE** /user/gpg_keys/{id} | Remove a GPG key +[**user_current_delete_key**](UserApi.md#user_current_delete_key) | **DELETE** /user/keys/{id} | Delete a public key +[**user_current_delete_star**](UserApi.md#user_current_delete_star) | **DELETE** /user/starred/{owner}/{repo} | Unstar the given repo +[**user_current_get_gpg_key**](UserApi.md#user_current_get_gpg_key) | **GET** /user/gpg_keys/{id} | Get a GPG key +[**user_current_get_key**](UserApi.md#user_current_get_key) | **GET** /user/keys/{id} | Get a public key +[**user_current_list_followers**](UserApi.md#user_current_list_followers) | **GET** /user/followers | List the authenticated user's followers +[**user_current_list_following**](UserApi.md#user_current_list_following) | **GET** /user/following | List the users that the authenticated user is following +[**user_current_list_gpg_keys**](UserApi.md#user_current_list_gpg_keys) | **GET** /user/gpg_keys | List the authenticated user's GPG keys +[**user_current_list_keys**](UserApi.md#user_current_list_keys) | **GET** /user/keys | List the authenticated user's public keys +[**user_current_list_repos**](UserApi.md#user_current_list_repos) | **GET** /user/repos | List the repos that the authenticated user owns or has access to +[**user_current_list_starred**](UserApi.md#user_current_list_starred) | **GET** /user/starred | The repos that the authenticated user has starred +[**user_current_list_subscriptions**](UserApi.md#user_current_list_subscriptions) | **GET** /user/subscriptions | List repositories watched by the authenticated user +[**user_current_post_gpg_key**](UserApi.md#user_current_post_gpg_key) | **POST** /user/gpg_keys | Create a GPG key +[**user_current_post_key**](UserApi.md#user_current_post_key) | **POST** /user/keys | Create a public key +[**user_current_put_follow**](UserApi.md#user_current_put_follow) | **PUT** /user/following/{username} | Follow a user +[**user_current_put_star**](UserApi.md#user_current_put_star) | **PUT** /user/starred/{owner}/{repo} | Star the given repo +[**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 +[**user_list_following**](UserApi.md#user_list_following) | **GET** /users/{username}/following | List the users that the given user is following +[**user_list_gpg_keys**](UserApi.md#user_list_gpg_keys) | **GET** /users/{username}/gpg_keys | List the given user's GPG keys +[**user_list_keys**](UserApi.md#user_list_keys) | **GET** /users/{username}/keys | List the given user's public keys +[**user_list_repos**](UserApi.md#user_list_repos) | **GET** /users/{username}/repos | List the repos owned by the given user +[**user_list_starred**](UserApi.md#user_list_starred) | **GET** /users/{username}/starred | The repos that the given user has starred +[**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_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** +> Repository create_current_user_repo(body=body) + +Create a repository + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) +body = giteapython.CreateRepoOption() # CreateRepoOption | (optional) + +try: + # Create a repository + api_response = api_instance.create_current_user_repo(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->create_current_user_repo: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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) + +# **user_add_email** +> list[Email] user_add_email(body=body) + +Add email addresses + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) +body = giteapython.CreateEmailOption() # CreateEmailOption | (optional) + +try: + # Add email addresses + api_response = api_instance.user_add_email(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_add_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateEmailOption**](CreateEmailOption.md)| | [optional] + +### Return type + +[**list[Email]**](Email.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_check_following** +> user_check_following(follower, followee) + +Check if one user is following another user + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) +follower = 'follower_example' # str | username of following user +followee = 'followee_example' # str | username of followed user + +try: + # Check if one user is following another user + api_instance.user_check_following(follower, followee) +except ApiException as e: + print("Exception when calling UserApi->user_check_following: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **follower** | **str**| username of following user | + **followee** | **str**| username of followed user | + +### 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) + +# **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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) +body = giteapython.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) + +Create an access token + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) +username = 'username_example' # str | username of user +access_token = giteapython.AccessToken() # AccessToken | (optional) + +try: + # Create an access token + api_instance.user_create_token(username, access_token=access_token) +except ApiException as e: + print("Exception when calling UserApi->user_create_token: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user | + **access_token** | [**AccessToken**](AccessToken.md)| | [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) + +# **user_current_check_following** +> user_current_check_following(username) + +Check whether a user is followed by the authenticated user + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) +username = 'username_example' # str | username of followed user + +try: + # Check whether a user is followed by the authenticated user + api_instance.user_current_check_following(username) +except ApiException as e: + print("Exception when calling UserApi->user_current_check_following: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of followed user | + +### 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) + +# **user_current_check_starring** +> user_current_check_starring(owner, repo) + +Whether the authenticated is starring the repo + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo + +try: + # Whether the authenticated is starring the repo + api_instance.user_current_check_starring(owner, repo) +except ApiException as e: + print("Exception when calling UserApi->user_current_check_starring: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + +### 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) + +# **user_current_delete_follow** +> user_current_delete_follow(username) + +Unfollow a user + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) +username = 'username_example' # str | username of user to unfollow + +try: + # Unfollow a user + api_instance.user_current_delete_follow(username) +except ApiException as e: + print("Exception when calling UserApi->user_current_delete_follow: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user to unfollow | + +### 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) + +# **user_current_delete_gpg_key** +> user_current_delete_gpg_key(id) + +Remove a GPG key + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) +id = 789 # int | id of key to delete + +try: + # Remove a GPG key + api_instance.user_current_delete_gpg_key(id) +except ApiException as e: + print("Exception when calling UserApi->user_current_delete_gpg_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of 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 + +[[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_delete_key** +> user_current_delete_key(id) + +Delete a public key + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) +id = 789 # int | id of key to delete + +try: + # Delete a public key + api_instance.user_current_delete_key(id) +except ApiException as e: + print("Exception when calling UserApi->user_current_delete_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of 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 + +[[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_delete_star** +> user_current_delete_star(owner, repo) + +Unstar the given repo + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo to unstar +repo = 'repo_example' # str | name of the repo to unstar + +try: + # Unstar the given repo + api_instance.user_current_delete_star(owner, repo) +except ApiException as e: + print("Exception when calling UserApi->user_current_delete_star: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo to unstar | + **repo** | **str**| name of the repo to unstar | + +### 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) + +# **user_current_get_gpg_key** +> GPGKey user_current_get_gpg_key(id) + +Get a GPG key + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) +id = 789 # int | id of key to get + +try: + # Get a GPG key + api_response = api_instance.user_current_get_gpg_key(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_get_gpg_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of key to get | + +### Return type + +[**GPGKey**](GPGKey.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_current_get_key** +> PublicKey user_current_get_key(id) + +Get a public key + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) +id = 789 # int | id of key to get + +try: + # Get a public key + api_response = api_instance.user_current_get_key(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_get_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| id of key to get | + +### Return type + +[**PublicKey**](PublicKey.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_current_list_followers** +> list[User] user_current_list_followers(page=page, limit=limit) + +List the authenticated user's followers + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.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(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_list_followers: %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[User]**](User.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_current_list_following** +> list[User] user_current_list_following(page=page, limit=limit) + +List the users that the authenticated user is following + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.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(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_list_following: %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[User]**](User.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_current_list_gpg_keys** +> list[GPGKey] user_current_list_gpg_keys(page=page, limit=limit) + +List the authenticated user's GPG keys + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.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(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 + +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[GPGKey]**](GPGKey.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_current_list_keys** +> list[PublicKey] user_current_list_keys(fingerprint=fingerprint, page=page, limit=limit) + +List the authenticated user's public keys + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_list_keys: %s\n" % e) +``` + +### Parameters + +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 + +[**list[PublicKey]**](PublicKey.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_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 + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.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(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_list_repos: %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[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) + +# **user_current_list_starred** +> list[Repository] user_current_list_starred(page=page, limit=limit) + +The repos that the authenticated user has starred + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.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(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_list_starred: %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[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) + +# **user_current_list_subscriptions** +> list[Repository] user_current_list_subscriptions(page=page, limit=limit) + +List repositories watched by the authenticated user + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.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(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_list_subscriptions: %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[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) + +# **user_current_post_gpg_key** +> GPGKey user_current_post_gpg_key(form=form) + +Create a GPG key + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) +form = giteapython.CreateGPGKeyOption() # CreateGPGKeyOption | (optional) + +try: + # Create a GPG key + api_response = api_instance.user_current_post_gpg_key(form=form) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_post_gpg_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **form** | [**CreateGPGKeyOption**](CreateGPGKeyOption.md)| | [optional] + +### Return type + +[**GPGKey**](GPGKey.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_current_post_key** +> PublicKey user_current_post_key(body=body) + +Create a public key + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) +body = giteapython.CreateKeyOption() # CreateKeyOption | (optional) + +try: + # Create a public key + api_response = api_instance.user_current_post_key(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_post_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateKeyOption**](CreateKeyOption.md)| | [optional] + +### Return type + +[**PublicKey**](PublicKey.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_current_put_follow** +> user_current_put_follow(username) + +Follow a user + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) +username = 'username_example' # str | username of user to follow + +try: + # Follow a user + api_instance.user_current_put_follow(username) +except ApiException as e: + print("Exception when calling UserApi->user_current_put_follow: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user to follow | + +### 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) + +# **user_current_put_star** +> user_current_put_star(owner, repo) + +Star the given repo + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo to star +repo = 'repo_example' # str | name of the repo to star + +try: + # Star the given repo + api_instance.user_current_put_star(owner, repo) +except ApiException as e: + print("Exception when calling UserApi->user_current_put_star: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo to star | + **repo** | **str**| name of the repo to star | + +### 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) + +# **user_current_tracked_times** +> list[TrackedTime] user_current_tracked_times(since=since, before=before) + +List the current user's tracked times + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.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(since=since, before=before) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_current_tracked_times: %s\n" % e) +``` + +### Parameters + +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 + +[**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) + +# **user_delete_access_token** +> user_delete_access_token(username, token) + +delete an access token + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) +username = 'username_example' # str | username of user +token = 789 # int | token to be deleted + +try: + # delete an access token + api_instance.user_delete_access_token(username, token) +except ApiException as e: + print("Exception when calling UserApi->user_delete_access_token: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user | + **token** | **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_delete_email** +> user_delete_email(body=body) + +Delete email addresses + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) +body = giteapython.DeleteEmailOption() # DeleteEmailOption | (optional) + +try: + # Delete email addresses + api_instance.user_delete_email(body=body) +except ApiException as e: + print("Exception when calling UserApi->user_delete_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**DeleteEmailOption**](DeleteEmailOption.md)| | [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, 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_delete_o_auth2_application** +> user_delete_o_auth2_application(id) + +delete an OAuth2 Application + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.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) + +Get a user + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) +username = 'username_example' # str | username of user to get + +try: + # Get a user + api_response = api_instance.user_get(username) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_get: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user to get | + +### Return type + +[**User**](User.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_current** +> User user_get_current() + +Get the authenticated user + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) + +try: + # Get the authenticated user + api_response = api_instance.user_get_current() + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_get_current: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**User**](User.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_heatmap_data** +> list[UserHeatmapData] user_get_heatmap_data(username) + +Get a user's heatmap + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) +username = 'username_example' # str | username of user to get + +try: + # Get a user's heatmap + api_response = api_instance.user_get_heatmap_data(username) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_get_heatmap_data: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| username of user to get | + +### Return type + +[**list[UserHeatmapData]**](UserHeatmapData.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_o_auth2_application** +> OAuth2Application user_get_o_auth2_application(id) + +get an OAuth2 Application + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.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 giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.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, page=page, limit=limit) + +List the authenticated user's access tokens + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_get_tokens: %s\n" % e) +``` + +### Parameters + +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 + +[**list[AccessToken]**](AccessToken.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_list_emails** +> list[Email] user_list_emails() + +List the authenticated user's email addresses + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) + +try: + # List the authenticated user's email addresses + api_response = api_instance.user_list_emails() + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_list_emails: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[Email]**](Email.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_list_followers** +> list[User] user_list_followers(username, page=page, limit=limit) + +List the given user's followers + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_list_followers: %s\n" % e) +``` + +### Parameters + +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 + +[**list[User]**](User.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_list_following** +> list[User] user_list_following(username, page=page, limit=limit) + +List the users that the given user is following + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_list_following: %s\n" % e) +``` + +### Parameters + +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 + +[**list[User]**](User.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_list_gpg_keys** +> list[GPGKey] user_list_gpg_keys(username, page=page, limit=limit) + +List the given user's GPG keys + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_list_gpg_keys: %s\n" % e) +``` + +### Parameters + +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 + +[**list[GPGKey]**](GPGKey.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_list_keys** +> list[PublicKey] user_list_keys(username, fingerprint=fingerprint, page=page, limit=limit) + +List the given user's public keys + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_list_keys: %s\n" % e) +``` + +### Parameters + +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 + +[**list[PublicKey]**](PublicKey.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_list_repos** +> list[Repository] user_list_repos(username, page=page, limit=limit) + +List the repos owned by the given user + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_list_repos: %s\n" % e) +``` + +### Parameters + +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 + +[**list[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) + +# **user_list_starred** +> list[Repository] user_list_starred(username, page=page, limit=limit) + +The repos that the given user has starred + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_list_starred: %s\n" % e) +``` + +### Parameters + +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 + +[**list[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) + +# **user_list_subscriptions** +> list[Repository] user_list_subscriptions(username, page=page, limit=limit) + +List the repositories watched by a user + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_list_subscriptions: %s\n" % e) +``` + +### Parameters + +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 + +[**list[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) + +# **user_list_teams** +> list[Team] user_list_teams(page=page, limit=limit) + +List all the teams a user belongs to + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.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(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_list_teams: %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[Team]**](Team.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_search** +> InlineResponse2001 user_search(q=q, uid=uid, page=page, limit=limit) + +Search for users + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) +q = 'q_example' # str | keyword (optional) +uid = 789 # int | ID of the user to search for (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, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_search: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **q** | **str**| keyword | [optional] + **uid** | **int**| ID of the user to search for | [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 + +[**InlineResponse2001**](InlineResponse2001.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_update_o_auth2_application** +> OAuth2Application user_update_o_auth2_application(id, body) + +update an OAuth2 Application, this includes regenerating the client secret + +### Example +```python +from __future__ import print_function +import time +import giteapython +from giteapython.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapython.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 = giteapython.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 = giteapython.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapython.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 = giteapython.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 = giteapython.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 = giteapython.UserApi(giteapython.ApiClient(configuration)) +id = 789 # int | application to be updated +body = giteapython.CreateOAuth2ApplicationOptions() # CreateOAuth2ApplicationOptions | + +try: + # 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_update_o_auth2_application: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| application to be updated | + **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) + diff --git a/docs/UserHeatmapData.md b/docs/UserHeatmapData.md new file mode 100644 index 0000000..8aaba2b --- /dev/null +++ b/docs/UserHeatmapData.md @@ -0,0 +1,11 @@ +# UserHeatmapData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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 new file mode 100644 index 0000000..ce71b23 --- /dev/null +++ b/docs/WatchInfo.md @@ -0,0 +1,15 @@ +# WatchInfo + +## 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] + +[[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/git_push.sh b/git_push.sh new file mode 100644 index 0000000..ae01b18 --- /dev/null +++ b/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/giteapython/__init__.py b/giteapython/__init__.py new file mode 100644 index 0000000..bbb3158 --- /dev/null +++ b/giteapython/__init__.py @@ -0,0 +1,154 @@ +# coding: utf-8 + +# flake8: noqa + +""" + 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 apis into sdk package +from giteapython.api.admin_api import AdminApi +from giteapython.api.issue_api import IssueApi +from giteapython.api.miscellaneous_api import MiscellaneousApi +from giteapython.api.notification_api import NotificationApi +from giteapython.api.organization_api import OrganizationApi +from giteapython.api.repository_api import RepositoryApi +from giteapython.api.user_api import UserApi + +# import ApiClient +from giteapython.api_client import ApiClient +from giteapython.configuration import Configuration +# import models into sdk package +from giteapython.models.api_error import APIError +from giteapython.models.access_token import AccessToken +from giteapython.models.add_collaborator_option import AddCollaboratorOption +from giteapython.models.add_time_option import AddTimeOption +from giteapython.models.annotated_tag import AnnotatedTag +from giteapython.models.annotated_tag_object import AnnotatedTagObject +from giteapython.models.attachment import Attachment +from giteapython.models.branch import Branch +from giteapython.models.branch_protection import BranchProtection +from giteapython.models.comment import Comment +from giteapython.models.commit import Commit +from giteapython.models.commit_date_options import CommitDateOptions +from giteapython.models.commit_meta import CommitMeta +from giteapython.models.commit_user import CommitUser +from giteapython.models.contents_response import ContentsResponse +from giteapython.models.create_branch_protection_option import CreateBranchProtectionOption +from giteapython.models.create_email_option import CreateEmailOption +from giteapython.models.create_file_options import CreateFileOptions +from giteapython.models.create_fork_option import CreateForkOption +from giteapython.models.create_gpg_key_option import CreateGPGKeyOption +from giteapython.models.create_hook_option import CreateHookOption +from giteapython.models.create_hook_option_config import CreateHookOptionConfig +from giteapython.models.create_issue_comment_option import CreateIssueCommentOption +from giteapython.models.create_issue_option import CreateIssueOption +from giteapython.models.create_key_option import CreateKeyOption +from giteapython.models.create_label_option import CreateLabelOption +from giteapython.models.create_milestone_option import CreateMilestoneOption +from giteapython.models.create_o_auth2_application_options import CreateOAuth2ApplicationOptions +from giteapython.models.create_org_option import CreateOrgOption +from giteapython.models.create_pull_request_option import CreatePullRequestOption +from giteapython.models.create_pull_review_comment import CreatePullReviewComment +from giteapython.models.create_pull_review_options import CreatePullReviewOptions +from giteapython.models.create_release_option import CreateReleaseOption +from giteapython.models.create_repo_option import CreateRepoOption +from giteapython.models.create_status_option import CreateStatusOption +from giteapython.models.create_team_option import CreateTeamOption +from giteapython.models.create_user_option import CreateUserOption +from giteapython.models.delete_email_option import DeleteEmailOption +from giteapython.models.delete_file_options import DeleteFileOptions +from giteapython.models.deploy_key import DeployKey +from giteapython.models.edit_attachment_options import EditAttachmentOptions +from giteapython.models.edit_branch_protection_option import EditBranchProtectionOption +from giteapython.models.edit_deadline_option import EditDeadlineOption +from giteapython.models.edit_git_hook_option import EditGitHookOption +from giteapython.models.edit_hook_option import EditHookOption +from giteapython.models.edit_issue_comment_option import EditIssueCommentOption +from giteapython.models.edit_issue_option import EditIssueOption +from giteapython.models.edit_label_option import EditLabelOption +from giteapython.models.edit_milestone_option import EditMilestoneOption +from giteapython.models.edit_org_option import EditOrgOption +from giteapython.models.edit_pull_request_option import EditPullRequestOption +from giteapython.models.edit_reaction_option import EditReactionOption +from giteapython.models.edit_release_option import EditReleaseOption +from giteapython.models.edit_repo_option import EditRepoOption +from giteapython.models.edit_team_option import EditTeamOption +from giteapython.models.edit_user_option import EditUserOption +from giteapython.models.email import Email +from giteapython.models.external_tracker import ExternalTracker +from giteapython.models.external_wiki import ExternalWiki +from giteapython.models.file_commit_response import FileCommitResponse +from giteapython.models.file_delete_response import FileDeleteResponse +from giteapython.models.file_links_response import FileLinksResponse +from giteapython.models.file_response import FileResponse +from giteapython.models.gpg_key import GPGKey +from giteapython.models.gpg_key_email import GPGKeyEmail +from giteapython.models.git_blob_response import GitBlobResponse +from giteapython.models.git_entry import GitEntry +from giteapython.models.git_hook import GitHook +from giteapython.models.git_object import GitObject +from giteapython.models.git_tree_response import GitTreeResponse +from giteapython.models.hook import Hook +from giteapython.models.identity import Identity +from giteapython.models.inline_response200 import InlineResponse200 +from giteapython.models.inline_response2001 import InlineResponse2001 +from giteapython.models.internal_tracker import InternalTracker +from giteapython.models.issue import Issue +from giteapython.models.issue_deadline import IssueDeadline +from giteapython.models.issue_labels_option import IssueLabelsOption +from giteapython.models.label import Label +from giteapython.models.markdown_option import MarkdownOption +from giteapython.models.merge_pull_request_option import MergePullRequestOption +from giteapython.models.migrate_repo_form import MigrateRepoForm +from giteapython.models.milestone import Milestone +from giteapython.models.notification_count import NotificationCount +from giteapython.models.notification_subject import NotificationSubject +from giteapython.models.notification_thread import NotificationThread +from giteapython.models.o_auth2_application import OAuth2Application +from giteapython.models.organization import Organization +from giteapython.models.pr_branch_info import PRBranchInfo +from giteapython.models.payload_commit import PayloadCommit +from giteapython.models.payload_commit_verification import PayloadCommitVerification +from giteapython.models.payload_user import PayloadUser +from giteapython.models.permission import Permission +from giteapython.models.public_key import PublicKey +from giteapython.models.pull_request import PullRequest +from giteapython.models.pull_request_meta import PullRequestMeta +from giteapython.models.pull_review import PullReview +from giteapython.models.pull_review_comment import PullReviewComment +from giteapython.models.reaction import Reaction +from giteapython.models.reference import Reference +from giteapython.models.release import Release +from giteapython.models.repo_commit import RepoCommit +from giteapython.models.repo_topic_options import RepoTopicOptions +from giteapython.models.repository import Repository +from giteapython.models.repository_meta import RepositoryMeta +from giteapython.models.review_state_type import ReviewStateType +from giteapython.models.search_results import SearchResults +from giteapython.models.server_version import ServerVersion +from giteapython.models.state_type import StateType +from giteapython.models.status import Status +from giteapython.models.status_state import StatusState +from giteapython.models.stop_watch import StopWatch +from giteapython.models.submit_pull_review_options import SubmitPullReviewOptions +from giteapython.models.tag import Tag +from giteapython.models.team import Team +from giteapython.models.time_stamp import TimeStamp +from giteapython.models.topic_name import TopicName +from giteapython.models.topic_response import TopicResponse +from giteapython.models.tracked_time import TrackedTime +from giteapython.models.transfer_repo_option import TransferRepoOption +from giteapython.models.update_file_options import UpdateFileOptions +from giteapython.models.user import User +from giteapython.models.user_heatmap_data import UserHeatmapData +from giteapython.models.watch_info import WatchInfo diff --git a/giteapython/api/__init__.py b/giteapython/api/__init__.py new file mode 100644 index 0000000..515f4d7 --- /dev/null +++ b/giteapython/api/__init__.py @@ -0,0 +1,12 @@ +from __future__ import absolute_import + +# flake8: noqa + +# import apis into api package +from giteapython.api.admin_api import AdminApi +from giteapython.api.issue_api import IssueApi +from giteapython.api.miscellaneous_api import MiscellaneousApi +from giteapython.api.notification_api import NotificationApi +from giteapython.api.organization_api import OrganizationApi +from giteapython.api.repository_api import RepositoryApi +from giteapython.api.user_api import UserApi diff --git a/giteapython/api/admin_api.py b/giteapython/api/admin_api.py new file mode 100644 index 0000000..0c6488c --- /dev/null +++ b/giteapython/api/admin_api.py @@ -0,0 +1,935 @@ +# 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 giteapython.api_client import ApiClient + + +class AdminApi(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 admin_create_org(self, username, organization, **kwargs): # noqa: E501 + """Create 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.admin_create_org(username, organization, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user that will own the created organization (required) + :param CreateOrgOption organization: (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.admin_create_org_with_http_info(username, organization, **kwargs) # noqa: E501 + else: + (data) = self.admin_create_org_with_http_info(username, organization, **kwargs) # noqa: E501 + return data + + def admin_create_org_with_http_info(self, username, organization, **kwargs): # noqa: E501 + """Create 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.admin_create_org_with_http_info(username, organization, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user that will own the created organization (required) + :param CreateOrgOption organization: (required) + :return: Organization + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'organization'] # 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 admin_create_org" % key + ) + params[key] = val + del params['kwargs'] + # 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 `admin_create_org`") # noqa: E501 + # verify the required parameter 'organization' is set + if ('organization' not in params or + params['organization'] is None): + raise ValueError("Missing the required parameter `organization` when calling `admin_create_org`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'organization' in params: + body_params = params['organization'] + # 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( + '/admin/users/{username}/orgs', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def admin_create_public_key(self, username, **kwargs): # noqa: E501 + """Add a public key 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 + >>> thread = api.admin_create_public_key(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user (required) + :param CreateKeyOption key: + :return: PublicKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_create_public_key_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.admin_create_public_key_with_http_info(username, **kwargs) # noqa: E501 + return data + + def admin_create_public_key_with_http_info(self, username, **kwargs): # noqa: E501 + """Add a public key 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 + >>> thread = api.admin_create_public_key_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user (required) + :param CreateKeyOption key: + :return: PublicKey + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'key'] # 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 admin_create_public_key" % key + ) + params[key] = val + del params['kwargs'] + # 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 `admin_create_public_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'key' in params: + body_params = params['key'] + # 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( + '/admin/users/{username}/keys', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PublicKey', # 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 admin_create_repo(self, username, repository, **kwargs): # 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 + >>> thread = api.admin_create_repo(username, repository, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user. This user will own the created repository (required) + :param CreateRepoOption repository: (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.admin_create_repo_with_http_info(username, repository, **kwargs) # noqa: E501 + else: + (data) = self.admin_create_repo_with_http_info(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 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 + >>> thread = api.admin_create_repo_with_http_info(username, repository, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user. This user will own the created repository (required) + :param CreateRepoOption repository: (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'repository'] # 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 admin_create_repo" % key + ) + params[key] = val + del params['kwargs'] + # 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 `admin_create_repo`") # noqa: E501 + # verify the required parameter 'repository' is set + if ('repository' not in params or + params['repository'] is None): + raise ValueError("Missing the required parameter `repository` when calling `admin_create_repo`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'repository' in params: + body_params = params['repository'] + # 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( + '/admin/users/{username}/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 admin_create_user(self, **kwargs): # noqa: E501 + """Create a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_create_user(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateUserOption body: + :return: User + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_create_user_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.admin_create_user_with_http_info(**kwargs) # noqa: E501 + return data + + def admin_create_user_with_http_info(self, **kwargs): # noqa: E501 + """Create a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_create_user_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateUserOption body: + :return: User + 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 admin_create_user" % key + ) + params[key] = val + del params['kwargs'] + + 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']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='User', # 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 admin_delete_user(self, username, **kwargs): # noqa: E501 + """Delete a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_delete_user(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user 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.admin_delete_user_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.admin_delete_user_with_http_info(username, **kwargs) # noqa: E501 + return data + + def admin_delete_user_with_http_info(self, username, **kwargs): # noqa: E501 + """Delete a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_delete_user_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # 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 admin_delete_user" % key + ) + params[key] = val + del params['kwargs'] + # 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 `admin_delete_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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( + '/admin/users/{username}', '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 admin_delete_user_public_key(self, username, id, **kwargs): # noqa: E501 + """Delete a user's public key # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_delete_user_public_key(username, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (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.admin_delete_user_public_key_with_http_info(username, id, **kwargs) # noqa: E501 + else: + (data) = self.admin_delete_user_public_key_with_http_info(username, id, **kwargs) # noqa: E501 + return data + + def admin_delete_user_public_key_with_http_info(self, username, id, **kwargs): # noqa: E501 + """Delete a user's public key # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_delete_user_public_key_with_http_info(username, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (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 = ['username', '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 admin_delete_user_public_key" % key + ) + params[key] = val + del params['kwargs'] + # 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 `admin_delete_user_public_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 `admin_delete_user_public_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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( + '/admin/users/{username}/keys/{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 admin_edit_user(self, username, **kwargs): # noqa: E501 + """Edit an existing user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_edit_user(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user to edit (required) + :param EditUserOption body: + :return: User + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_edit_user_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.admin_edit_user_with_http_info(username, **kwargs) # noqa: E501 + return data + + def admin_edit_user_with_http_info(self, username, **kwargs): # noqa: E501 + """Edit an existing user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_edit_user_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user to edit (required) + :param EditUserOption body: + :return: User + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', '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 admin_edit_user" % key + ) + params[key] = val + del params['kwargs'] + # 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 `admin_edit_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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( + '/admin/users/{username}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='User', # 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 admin_get_all_orgs(self, **kwargs): # noqa: E501 + """List all 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.admin_get_all_orgs(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[Organization] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_get_all_orgs_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.admin_get_all_orgs_with_http_info(**kwargs) # noqa: E501 + return data + + def admin_get_all_orgs_with_http_info(self, **kwargs): # noqa: E501 + """List all 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.admin_get_all_orgs_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[Organization] + 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 admin_get_all_orgs" % 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( + '/admin/orgs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def admin_get_all_users(self, **kwargs): # noqa: E501 + """List all users # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_get_all_users(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[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_get_all_users_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.admin_get_all_users_with_http_info(**kwargs) # noqa: E501 + return data + + def admin_get_all_users_with_http_info(self, **kwargs): # noqa: E501 + """List all users # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_get_all_users_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[User] + 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 admin_get_all_users" % 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( + '/admin/users', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/giteapython/api/issue_api.py b/giteapython/api/issue_api.py new file mode 100644 index 0000000..7dc16eb --- /dev/null +++ b/giteapython/api/issue_api.py @@ -0,0 +1,5396 @@ +# 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 giteapython.api_client import ApiClient + + +class IssueApi(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 issue_add_label(self, owner, repo, index, **kwargs): # noqa: E501 + """Add a label 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_add_label(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] + 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_label_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_add_label_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_add_label_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Add a label 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_add_label_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] + 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_add_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_add_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_add_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_add_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 + + 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}/labels', 'POST', + 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_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, 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 AddTimeOption body: + :return: 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_add_time_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (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, 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, 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 AddTimeOption body: + :return: TrackedTime + 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_add_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_add_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_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 = {} + + 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}/times', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='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) + + 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 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_clear_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: 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_clear_labels_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_clear_labels_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_clear_labels_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Remove all labels 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_clear_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: None + 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_clear_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_clear_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_clear_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_clear_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', '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 issue_create_comment(self, owner, repo, index, **kwargs): # noqa: E501 + """Add a comment 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_create_comment(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 CreateIssueCommentOption 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_create_comment_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_create_comment_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_create_comment_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Add a comment 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_create_comment_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 CreateIssueCommentOption body: + :return: Comment + 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_create_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_create_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_create_comment`") # 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_create_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 '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}/comments', 'POST', + 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_create_issue(self, owner, repo, **kwargs): # noqa: E501 + """Create 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_create_issue(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 CreateIssueOption 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_create_issue_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.issue_create_issue_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def issue_create_issue_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create 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_create_issue_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 CreateIssueOption body: + :return: Issue + 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 issue_create_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_create_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_create_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 + + 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', 'POST', + 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_create_label(self, owner, repo, **kwargs): # noqa: E501 + """Create 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_create_label(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 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.issue_create_label_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.issue_create_label_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def issue_create_label_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create 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_create_label_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 CreateLabelOption body: + :return: Label + 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 issue_create_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_create_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_create_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 + + 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', '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 issue_create_milestone(self, owner, repo, **kwargs): # noqa: E501 + """Create 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_create_milestone(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 CreateMilestoneOption 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_create_milestone_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.issue_create_milestone_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def issue_create_milestone_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create 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_create_milestone_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 CreateMilestoneOption body: + :return: Milestone + 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 issue_create_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_create_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_create_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 + + 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', 'POST', + 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_delete_comment(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete 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_delete_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 comment 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_delete_comment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_comment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_delete_comment_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete 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_delete_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 comment to delete (required) + :return: None + 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_delete_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_delete_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_delete_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_delete_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', '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( + '/repos/{owner}/{repo}/issues/comments/{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 issue_delete_comment_deprecated(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Delete 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_delete_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: this parameter is ignored (required) + :param int id: id of comment 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_delete_comment_deprecated_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_comment_deprecated_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + return data + + def issue_delete_comment_deprecated_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Delete 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_delete_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 comment to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + 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') + 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_delete_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_delete_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_delete_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_delete_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_delete_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 + # 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( + '/repos/{owner}/{repo}/issues/{index}/comments/{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 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_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 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_comment_reaction_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_comment_reaction_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + 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_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 comment to edit (required) + :param EditReactionOption content: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + 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') + 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_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_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_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_comment_reaction`") # 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 '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']) # 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', '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 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_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 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_issue_reaction_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_issue_reaction_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + 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_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 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', 'index', 'content'] # 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_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_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_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 = {} + + 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 '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']) # 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', '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 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_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 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_delete_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_label_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 + + 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) + >>> 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) + :return: None + 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_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_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_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_delete_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', '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( + '/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=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_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_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 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_delete_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + 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_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 id: id of the milestone to delete (required) + :return: None + 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_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_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_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 + + 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', '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( + '/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=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_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_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 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_delete_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + 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_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 stop the stopwatch on (required) + :return: None + 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_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_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_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_delete_stop_watch`") # 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}/stopwatch/delete', '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 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_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 (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_delete_subscription_with_http_info(owner, repo, index, user, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_subscription_with_http_info(owner, repo, index, user, **kwargs) # noqa: E501 + return data + + 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_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 (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', '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_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_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_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_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 = {} + + 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}', '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 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_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 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_delete_time_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_time_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + return data + + 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_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 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', 'index', '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_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_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_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_delete_time`") # 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 + # 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}/times/{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 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_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 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_comment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_edit_comment_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 + + 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) + >>> 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 + 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_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_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_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_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 + 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/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_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_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: 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_edit_comment_deprecated_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + else: + (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 + """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_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 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', 'state', '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_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_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_milestones_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 '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 = {} + + 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', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _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 + + 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) + >>> 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 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_repo_comments_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_repo_comments_with_http_info(owner, repo, **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 + + 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) + >>> 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 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', '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 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_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_repo_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 + + 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 = {} + + 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/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_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_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 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_list_issues_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.issue_list_issues_with_http_info(owner, repo, **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 + + 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) + >>> 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 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', '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') + 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_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_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_list_issues`") # 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 '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 = {} + + 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', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _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 + + 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) + >>> 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 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_list_labels_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.issue_list_labels_with_http_info(owner, repo, **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 + + 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) + >>> 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 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', '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_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_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_list_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 + + 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( + '/repos/{owner}/{repo}/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_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_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 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_post_comment_reaction_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_post_comment_reaction_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + 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_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 comment to edit (required) + :param EditReactionOption content: + :return: Reaction + If the method is called asynchronously, + returns the request thread. + """ + + 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') + 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_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_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_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_post_comment_reaction`") # 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 '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']) # 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', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + 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_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 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_post_issue_reaction_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_post_issue_reaction_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + 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_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 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', 'index', 'content'] # 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_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_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_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 = {} + + 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 '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']) # 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', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _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 + + 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) + >>> 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 + 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 + else: + (data) = self.issue_remove_label_with_http_info(owner, repo, index, id, **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 + + 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) + >>> 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 + If the method is called asynchronously, + returns the request thread. + """ + + 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') + 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_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_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 = [] + + 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/{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 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_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 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_replace_labels_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_replace_labels_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 + + 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) + >>> 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] + 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_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_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_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 = {} + + 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}/labels', 'PUT', + 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_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_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) + :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_reset_time_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_reset_time_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + 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_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) + :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', '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_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_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_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 = {} + + 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}/times', '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 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_search_issues(async_req=True) + >>> result = thread.get() + + :param async_req bool + :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_search_issues_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.issue_search_issues_with_http_info(**kwargs) # noqa: E501 + return data + + 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_search_issues_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :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 = ['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') + 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_search_issues" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + 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 = {} + + 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/issues/search', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _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 + + 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) + >>> 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) + :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 + else: + (data) = self.issue_start_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 + + 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) + >>> 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) + :return: None + 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_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_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_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_start_stop_watch`") # 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}/stopwatch/start', 'POST', + 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_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_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 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_stop_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_stop_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + 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_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 stop the stopwatch on (required) + :return: None + 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_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_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_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_stop_stop_watch`") # 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}/stopwatch/stop', 'POST', + 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_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_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 (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_subscriptions_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_subscriptions_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + 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_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 (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', '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_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_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_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_subscriptions`") # 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}/subscriptions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + 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, 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: 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, index, **kwargs) # noqa: E501 + else: + (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, 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, 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: 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', 'index', '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 issue_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 `issue_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 `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 = {} + + 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 + 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}/issues/{index}/times', '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/giteapython/api/miscellaneous_api.py b/giteapython/api/miscellaneous_api.py new file mode 100644 index 0000000..0f437c1 --- /dev/null +++ b/giteapython/api/miscellaneous_api.py @@ -0,0 +1,402 @@ +# 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 giteapython.api_client import ApiClient + + +class MiscellaneousApi(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 get_signing_key(self, **kwargs): # noqa: E501 + """Get default signing-key.gpg # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_signing_key(async_req=True) + >>> result = thread.get() + + :param async_req bool + :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.get_signing_key_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_signing_key_with_http_info(**kwargs) # noqa: E501 + return data + + def get_signing_key_with_http_info(self, **kwargs): # noqa: E501 + """Get default signing-key.gpg # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_signing_key_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: str + 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 get_signing_key" % 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( + ['text/plain']) # 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( + '/signing-key.gpg', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_version(self, **kwargs): # noqa: E501 + """Returns the version of the Gitea 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.get_version(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ServerVersion + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_version_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_version_with_http_info(**kwargs) # noqa: E501 + return data + + def get_version_with_http_info(self, **kwargs): # noqa: E501 + """Returns the version of the Gitea 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.get_version_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ServerVersion + 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 get_version" % 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']) # 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( + '/version', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ServerVersion', # 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 render_markdown(self, **kwargs): # noqa: E501 + """Render a markdown document as HTML # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.render_markdown(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param MarkdownOption body: + :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.render_markdown_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.render_markdown_with_http_info(**kwargs) # noqa: E501 + return data + + def render_markdown_with_http_info(self, **kwargs): # noqa: E501 + """Render a markdown document as HTML # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.render_markdown_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param MarkdownOption body: + :return: str + 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 render_markdown" % key + ) + params[key] = val + del params['kwargs'] + + 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( + ['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 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/markdown', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def render_markdown_raw(self, body, **kwargs): # noqa: E501 + """Render raw markdown as HTML # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.render_markdown_raw(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str body: Request body to render (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.render_markdown_raw_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.render_markdown_raw_with_http_info(body, **kwargs) # noqa: E501 + return data + + def render_markdown_raw_with_http_info(self, body, **kwargs): # noqa: E501 + """Render raw markdown as HTML # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.render_markdown_raw_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str body: Request body to render (required) + :return: str + 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 render_markdown_raw" % 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 `render_markdown_raw`") # 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( + ['text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/markdown/raw', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/giteapython/api/notification_api.py b/giteapython/api/notification_api.py new file mode 100644 index 0000000..40c7538 --- /dev/null +++ b/giteapython/api/notification_api.py @@ -0,0 +1,793 @@ +# 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 giteapython.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 list[str] status_types: Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned. + :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 list[str] status_types: Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned. + :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', 'status_types', '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 'status_types' in params: + query_params.append(('status-types', params['status_types'])) # noqa: E501 + collection_formats['status-types'] = 'multi' # 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 list[str] status_types: Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned + :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 list[str] status_types: Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned + :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', 'status_types', '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 'status_types' in params: + query_params.append(('status-types', params['status_types'])) # noqa: E501 + collection_formats['status-types'] = 'multi' # 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, pinned or unread # 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. + :param str all: If true, mark all notifications on this repo. Default value is false + :param list[str] status_types: Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. + :param str to_status: Status to mark notifications as, Defaults to read. + :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, pinned or unread # 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. + :param str all: If true, mark all notifications on this repo. Default value is false + :param list[str] status_types: Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. + :param str to_status: Status to mark notifications as, Defaults to read. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['last_read_at', 'all', 'status_types', 'to_status'] # 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 + if 'all' in params: + query_params.append(('all', params['all'])) # noqa: E501 + if 'status_types' in params: + query_params.append(('status-types', params['status_types'])) # noqa: E501 + collection_formats['status-types'] = 'multi' # noqa: E501 + if 'to_status' in params: + query_params.append(('to-status', params['to_status'])) # 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, pinned or unread 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 str all: If true, mark all notifications on this repo. Default value is false + :param list[str] status_types: Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. + :param str to_status: Status to mark notifications as. Defaults to read. + :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, pinned or unread 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 str all: If true, mark all notifications on this repo. Default value is false + :param list[str] status_types: Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. + :param str to_status: Status to mark notifications as. Defaults to read. + :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', 'all', 'status_types', 'to_status', '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 'all' in params: + query_params.append(('all', params['all'])) # noqa: E501 + if 'status_types' in params: + query_params.append(('status-types', params['status_types'])) # noqa: E501 + collection_formats['status-types'] = 'multi' # noqa: E501 + if 'to_status' in params: + query_params.append(('to-status', params['to_status'])) # noqa: E501 + 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) + :param str to_status: Status to mark notifications as + :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) + :param str to_status: Status to mark notifications as + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'to_status'] # 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 = [] + if 'to_status' in params: + query_params.append(('to-status', params['to_status'])) # 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/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/giteapython/api/organization_api.py b/giteapython/api/organization_api.py new file mode 100644 index 0000000..eea4971 --- /dev/null +++ b/giteapython/api/organization_api.py @@ -0,0 +1,4192 @@ +# 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 giteapython.api_client import ApiClient + + +class OrganizationApi(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 create_org_repo(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(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_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.create_org_repo_with_http_info(org, **kwargs) # noqa: E501 + return data + + def create_org_repo_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_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" % 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`") # 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}/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, + 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 org_add_team_member(self, id, username, **kwargs): # noqa: E501 + """Add a team member # 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_add_team_member(id, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str username: username of the user to add (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_add_team_member_with_http_info(id, username, **kwargs) # noqa: E501 + else: + (data) = self.org_add_team_member_with_http_info(id, username, **kwargs) # noqa: E501 + return data + + def org_add_team_member_with_http_info(self, id, username, **kwargs): # noqa: E501 + """Add a team member # 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_add_team_member_with_http_info(id, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str username: username of the user to add (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'username'] # 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_add_team_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_add_team_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_add_team_member`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'username' in params: + path_params['username'] = params['username'] # 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( + '/teams/{id}/members/{username}', '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 org_add_team_repository(self, id, org, repo, **kwargs): # noqa: E501 + """Add a repository to 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_add_team_repository(id, org, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str org: organization that owns the repo to add (required) + :param str repo: name of the repo to add (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_add_team_repository_with_http_info(id, org, repo, **kwargs) # noqa: E501 + else: + (data) = self.org_add_team_repository_with_http_info(id, org, repo, **kwargs) # noqa: E501 + return data + + def org_add_team_repository_with_http_info(self, id, org, repo, **kwargs): # noqa: E501 + """Add a repository to 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_add_team_repository_with_http_info(id, org, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str org: organization that owns the repo to add (required) + :param str repo: name of the repo to add (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'org', '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 org_add_team_repository" % 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_add_team_repository`") # 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_add_team_repository`") # 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 `org_add_team_repository`") # 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 'repo' in params: + path_params['repo'] = params['repo'] # 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( + '/teams/{id}/repos/{org}/{repo}', '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 org_conceal_member(self, org, username, **kwargs): # noqa: E501 + """Conceal a user's membership # 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_conceal_member(org, username, 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) + :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_conceal_member_with_http_info(org, username, **kwargs) # noqa: E501 + else: + (data) = self.org_conceal_member_with_http_info(org, username, **kwargs) # noqa: E501 + return data + + def org_conceal_member_with_http_info(self, org, username, **kwargs): # noqa: E501 + """Conceal a user's membership # 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_conceal_member_with_http_info(org, username, 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) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'username'] # 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_conceal_member" % 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_conceal_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_conceal_member`") # 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 + + 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}/public_members/{username}', '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_create(self, organization, **kwargs): # noqa: E501 + """Create 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(organization, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateOrgOption organization: (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_create_with_http_info(organization, **kwargs) # noqa: E501 + else: + (data) = self.org_create_with_http_info(organization, **kwargs) # noqa: E501 + return data + + def org_create_with_http_info(self, organization, **kwargs): # noqa: E501 + """Create 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_with_http_info(organization, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateOrgOption organization: (required) + :return: Organization + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['organization'] # 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" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'organization' is set + if ('organization' not in params or + params['organization'] is None): + raise ValueError("Missing the required parameter `organization` when calling `org_create`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'organization' in params: + body_params = params['organization'] + # 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', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def org_create_hook(self, org, body, **kwargs): # noqa: E501 + """Create 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_create_hook(org, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param CreateHookOption body: (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_create_hook_with_http_info(org, body, **kwargs) # noqa: E501 + else: + (data) = self.org_create_hook_with_http_info(org, body, **kwargs) # noqa: E501 + return data + + def org_create_hook_with_http_info(self, org, body, **kwargs): # noqa: E501 + """Create 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_create_hook_with_http_info(org, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param CreateHookOption body: (required) + :return: Hook + 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_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_create_hook`") # 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 `org_create_hook`") # 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}/hooks/', 'POST', + 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_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 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_create_team(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param CreateTeamOption 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_create_team_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_create_team_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_create_team_with_http_info(self, org, **kwargs): # noqa: E501 + """Create 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_create_team_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param CreateTeamOption body: + :return: Team + 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_team" % 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_team`") # 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}/teams', 'POST', + 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_delete(self, org, **kwargs): # noqa: E501 + """Delete 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(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: organization that is 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.org_delete_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_delete_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_delete_with_http_info(self, org, **kwargs): # noqa: E501 + """Delete 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_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: organization that is to be deleted (required) + :return: None + 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_delete" % 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`") # 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}', '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_delete_hook(self, org, id, **kwargs): # noqa: E501 + """Delete 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_delete_hook(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 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_hook_with_http_info(org, id, **kwargs) # noqa: E501 + else: + (data) = self.org_delete_hook_with_http_info(org, id, **kwargs) # noqa: E501 + return data + + def org_delete_hook_with_http_info(self, org, id, **kwargs): # noqa: E501 + """Delete 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_delete_hook_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 delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '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_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_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 `org_delete_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 = [] + + 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}', '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_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_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 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_label_with_http_info(org, id, **kwargs) # noqa: E501 + else: + (data) = self.org_delete_label_with_http_info(org, id, **kwargs) # noqa: E501 + return data + + 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_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 delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '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_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_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 '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( + '/orgs/{org}/labels/{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_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_member(org, username, 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) + :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 + else: + (data) = self.org_delete_member_with_http_info(org, username, **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 + + 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) + >>> result = thread.get() + + :param async_req bool + :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 = ['org', 'username'] # 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_member" % 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 + + 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 + + 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}/members/{username}', '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_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 + >>> thread = api.org_edit(org, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization to edit (required) + :param EditOrgOption body: (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_edit_with_http_info(org, body, **kwargs) # noqa: E501 + else: + (data) = self.org_edit_with_http_info(org, body, **kwargs) # noqa: E501 + return data + + def org_edit_with_http_info(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 + >>> thread = api.org_edit_with_http_info(org, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization to edit (required) + :param EditOrgOption body: (required) + :return: Organization + 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_edit" % 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`") # 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 `org_edit`") # 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}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def org_edit_hook(self, org, id, **kwargs): # noqa: E501 + """Update 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_edit_hook(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 update (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.org_edit_hook_with_http_info(org, id, **kwargs) # noqa: E501 + else: + (data) = self.org_edit_hook_with_http_info(org, id, **kwargs) # noqa: E501 + return data + + def org_edit_hook_with_http_info(self, org, id, **kwargs): # noqa: E501 + """Update 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_edit_hook_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 update (required) + :param EditHookOption body: + :return: Hook + 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_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_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 `org_edit_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 = [] + + 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}/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}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + 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_get_all(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[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_all_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.org_get_all_with_http_info(**kwargs) # noqa: E501 + return data + + 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_get_all_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[Organization] + 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 org_get_all" % 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( + '/orgs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _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 + + 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) + >>> 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 + 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 + else: + (data) = self.org_get_hook_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 + + 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) + >>> 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 + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '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_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_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 = [] + + 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}', '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 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_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 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_label_with_http_info(org, id, **kwargs) # noqa: E501 + else: + (data) = self.org_get_label_with_http_info(org, id, **kwargs) # noqa: E501 + return data + + 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_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 get (required) + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '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_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_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_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 + # 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/{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 org_get_team(self, id, **kwargs): # noqa: E501 + """Get 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_get_team(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team to get (required) + :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_get_team_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.org_get_team_with_http_info(id, **kwargs) # noqa: E501 + return data + + def org_get_team_with_http_info(self, id, **kwargs): # noqa: E501 + """Get 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_get_team_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team to get (required) + :return: Team + 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_get_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_get_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']) # 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}', 'GET', + 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_is_member(self, org, username, **kwargs): # noqa: E501 + """Check if a user is a member of 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_is_member(org, username, 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) + :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_is_member_with_http_info(org, username, **kwargs) # noqa: E501 + else: + (data) = self.org_is_member_with_http_info(org, username, **kwargs) # noqa: E501 + return data + + def org_is_member_with_http_info(self, org, username, **kwargs): # noqa: E501 + """Check if a user is a member of 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_is_member_with_http_info(org, username, 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) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'username'] # 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_is_member" % 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_is_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_is_member`") # 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 + + 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( + '/orgs/{org}/members/{username}', '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 org_is_public_member(self, org, username, **kwargs): # noqa: E501 + """Check if a user is a public member of 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_is_public_member(org, username, 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) + :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_is_public_member_with_http_info(org, username, **kwargs) # noqa: E501 + else: + (data) = self.org_is_public_member_with_http_info(org, username, **kwargs) # noqa: E501 + return data + + def org_is_public_member_with_http_info(self, org, username, **kwargs): # noqa: E501 + """Check if a user is a public member of 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_is_public_member_with_http_info(org, username, 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) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'username'] # 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_is_public_member" % 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_is_public_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_is_public_member`") # 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 + + 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( + '/orgs/{org}/public_members/{username}', '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 org_list_current_user_orgs(self, **kwargs): # noqa: E501 + """List the current user's 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_list_current_user_orgs(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[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_list_current_user_orgs_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.org_list_current_user_orgs_with_http_info(**kwargs) # noqa: E501 + return data + + def org_list_current_user_orgs_with_http_info(self, **kwargs): # noqa: E501 + """List the current user's 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_list_current_user_orgs_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[Organization] + 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 org_list_current_user_orgs" % 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/orgs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def org_list_hooks(self, org, **kwargs): # noqa: E501 + """List an organization's webhooks # 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_hooks(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[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_list_hooks_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_list_hooks_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_list_hooks_with_http_info(self, org, **kwargs): # noqa: E501 + """List an organization's webhooks # 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_hooks_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[Hook] + 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_hooks" % 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_hooks`") # 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}/hooks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[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_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 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_members(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[User] + 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_members_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_list_members_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_list_members_with_http_info(self, org, **kwargs): # noqa: E501 + """List an organization's members # 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_members_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[User] + 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_members" % 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_members`") # 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}/members', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def org_list_public_members(self, org, **kwargs): # noqa: E501 + """List an organization's public members # 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_public_members(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[User] + 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_public_members_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_list_public_members_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_list_public_members_with_http_info(self, org, **kwargs): # noqa: E501 + """List an organization's public members # 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_public_members_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[User] + 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_public_members" % 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_public_members`") # 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}/public_members', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def org_list_repos(self, org, **kwargs): # noqa: E501 + """List an organization's repos # 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_repos(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[Repository] + 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_repos_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_list_repos_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_list_repos_with_http_info(self, org, **kwargs): # noqa: E501 + """List an organization's repos # 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_repos_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[Repository] + 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_repos" % 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_repos`") # 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}/repos', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[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 org_list_team_member(self, id, username, **kwargs): # noqa: E501 + """List a particular member of 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_list_team_member(id, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str username: username of the member to list (required) + :return: User + 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_team_member_with_http_info(id, username, **kwargs) # noqa: E501 + else: + (data) = self.org_list_team_member_with_http_info(id, username, **kwargs) # noqa: E501 + return data + + def org_list_team_member_with_http_info(self, id, username, **kwargs): # noqa: E501 + """List a particular member of 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_list_team_member_with_http_info(id, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str username: username of the member to list (required) + :return: User + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'username'] # 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_team_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_list_team_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_list_team_member`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'username' in params: + path_params['username'] = params['username'] # 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( + '/teams/{id}/members/{username}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='User', # 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_team_members(self, id, **kwargs): # noqa: E501 + """List a team's members # 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_team_members(id, async_req=True) + >>> result = thread.get() + + :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. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_team_members_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.org_list_team_members_with_http_info(id, **kwargs) # noqa: E501 + return data + + def org_list_team_members_with_http_info(self, id, **kwargs): # noqa: E501 + """List a team's members # 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_team_members_with_http_info(id, async_req=True) + >>> result = thread.get() + + :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', '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_team_members" % 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_list_team_members`") # 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 = {} + + 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( + '/teams/{id}/members', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def org_list_team_repos(self, id, **kwargs): # noqa: E501 + """List a team's repos # 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_team_repos(id, async_req=True) + >>> result = thread.get() + + :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. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_team_repos_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.org_list_team_repos_with_http_info(id, **kwargs) # noqa: E501 + return data + + def org_list_team_repos_with_http_info(self, id, **kwargs): # noqa: E501 + """List a team's repos # 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_team_repos_with_http_info(id, async_req=True) + >>> result = thread.get() + + :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', '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_team_repos" % 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_list_team_repos`") # 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 = {} + + 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( + '/teams/{id}/repos', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[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 org_list_teams(self, org, **kwargs): # noqa: E501 + """List an organization's teams # 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_teams(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[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_list_teams_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_list_teams_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_list_teams_with_http_info(self, org, **kwargs): # noqa: E501 + """List an organization's teams # 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_teams_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[Team] + 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_teams" % 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_teams`") # 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}/teams', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[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_list_user_orgs(self, username, **kwargs): # noqa: E501 + """List a user's 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_list_user_orgs(username, async_req=True) + >>> result = thread.get() + + :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. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_user_orgs_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.org_list_user_orgs_with_http_info(username, **kwargs) # noqa: E501 + return data + + def org_list_user_orgs_with_http_info(self, username, **kwargs): # noqa: E501 + """List a user's 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_list_user_orgs_with_http_info(username, async_req=True) + >>> result = thread.get() + + :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', '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_user_orgs" % key + ) + params[key] = val + del params['kwargs'] + # 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_list_user_orgs`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + 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 = {} + + 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( + '/users/{username}/orgs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def org_publicize_member(self, org, username, **kwargs): # noqa: E501 + """Publicize a user's membership # 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_publicize_member(org, username, 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) + :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_publicize_member_with_http_info(org, username, **kwargs) # noqa: E501 + else: + (data) = self.org_publicize_member_with_http_info(org, username, **kwargs) # noqa: E501 + return data + + def org_publicize_member_with_http_info(self, org, username, **kwargs): # noqa: E501 + """Publicize a user's membership # 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_publicize_member_with_http_info(org, username, 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) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'username'] # 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_publicize_member" % 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_publicize_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_publicize_member`") # 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 + + 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}/public_members/{username}', '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 org_remove_team_member(self, id, username, **kwargs): # noqa: E501 + """Remove a team member # 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_remove_team_member(id, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str username: username of the user 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.org_remove_team_member_with_http_info(id, username, **kwargs) # noqa: E501 + else: + (data) = self.org_remove_team_member_with_http_info(id, username, **kwargs) # noqa: E501 + return data + + def org_remove_team_member_with_http_info(self, id, username, **kwargs): # noqa: E501 + """Remove a team member # 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_remove_team_member_with_http_info(id, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str username: username of the user to remove (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'username'] # 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_remove_team_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_remove_team_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_remove_team_member`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'username' in params: + path_params['username'] = params['username'] # 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( + '/teams/{id}/members/{username}', '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_remove_team_repository(self, id, org, repo, **kwargs): # noqa: E501 + """Remove a repository from a team # noqa: E501 + + This does not delete the repository, it only removes the repository from the 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_remove_team_repository(id, org, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str org: organization that owns the repo to remove (required) + :param str repo: name of the repo 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.org_remove_team_repository_with_http_info(id, org, repo, **kwargs) # noqa: E501 + else: + (data) = self.org_remove_team_repository_with_http_info(id, org, repo, **kwargs) # noqa: E501 + return data + + def org_remove_team_repository_with_http_info(self, id, org, repo, **kwargs): # noqa: E501 + """Remove a repository from a team # noqa: E501 + + This does not delete the repository, it only removes the repository from the 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_remove_team_repository_with_http_info(id, org, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str org: organization that owns the repo to remove (required) + :param str repo: name of the repo to remove (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'org', '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 org_remove_team_repository" % 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_remove_team_repository`") # 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_remove_team_repository`") # 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 `org_remove_team_repository`") # 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 'repo' in params: + path_params['repo'] = params['repo'] # 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( + '/teams/{id}/repos/{org}/{repo}', '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 team_search(self, org, **kwargs): # noqa: E501 + """Search for teams within 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.team_search(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :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 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. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.team_search_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.team_search_with_http_info(org, **kwargs) # noqa: E501 + return data + + def team_search_with_http_info(self, org, **kwargs): # noqa: E501 + """Search for teams within 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.team_search_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :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 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', '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 team_search" % 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 `team_search`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + if 'q' in params: + query_params.append(('q', params['q'])) # noqa: E501 + if 'include_desc' in params: + query_params.append(('include_desc', params['include_desc'])) # 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( + '/orgs/{org}/teams/search', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InlineResponse200', # 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/giteapython/api/repository_api.py b/giteapython/api/repository_api.py new file mode 100644 index 0000000..4c0eb00 --- /dev/null +++ b/giteapython/api/repository_api.py @@ -0,0 +1,10402 @@ +# 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 giteapython.api_client import ApiClient + + +class RepositoryApi(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 create_current_user_repo(self, **kwargs): # noqa: E501 + """Create 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.create_current_user_repo(async_req=True) + >>> result = thread.get() + + :param async_req bool + :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_current_user_repo_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.create_current_user_repo_with_http_info(**kwargs) # noqa: E501 + return data + + def create_current_user_repo_with_http_info(self, **kwargs): # noqa: E501 + """Create 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.create_current_user_repo_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateRepoOption body: + :return: Repository + 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 create_current_user_repo" % key + ) + params[key] = val + del params['kwargs'] + + 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']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/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_fork(self, owner, repo, **kwargs): # noqa: E501 + """Fork 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.create_fork(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to fork (required) + :param str repo: name of the repo to fork (required) + :param CreateForkOption 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_fork_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.create_fork_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def create_fork_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Fork 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.create_fork_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to fork (required) + :param str repo: name of the repo to fork (required) + :param CreateForkOption body: + :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 create_fork" % 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 `create_fork`") # 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 `create_fork`") # 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}/forks', '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 get_blob(self, owner, repo, sha, **kwargs): # noqa: E501 + """Gets the blob 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.get_blob(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 str sha: sha of the commit (required) + :return: GitBlobResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_blob_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + else: + (data) = self.get_blob_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + return data + + def get_blob_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 + """Gets the blob 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.get_blob_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 str sha: sha of the commit (required) + :return: GitBlobResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'sha'] # 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 get_blob" % 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 `get_blob`") # 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 `get_blob`") # 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 `get_blob`") # 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 'sha' in params: + path_params['sha'] = params['sha'] # 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}/git/blobs/{sha}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GitBlobResponse', # 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 get_tag(self, owner, repo, sha, **kwargs): # noqa: E501 + """Gets the tag object of an annotated tag (not lightweight tags) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_tag(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 str sha: sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags. (required) + :return: AnnotatedTag + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_tag_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + else: + (data) = self.get_tag_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + return data + + def get_tag_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 + """Gets the tag object of an annotated tag (not lightweight tags) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_tag_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 str sha: sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags. (required) + :return: AnnotatedTag + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'sha'] # 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 get_tag" % 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 `get_tag`") # 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 `get_tag`") # 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 `get_tag`") # 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 'sha' in params: + path_params['sha'] = params['sha'] # 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}/git/tags/{sha}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AnnotatedTag', # 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 get_tree(self, owner, repo, sha, **kwargs): # noqa: E501 + """Gets the tree 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.get_tree(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 str sha: sha of the commit (required) + :param bool recursive: show all directories and files + :param int page: page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page + :param int per_page: number of items per page; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE + :return: GitTreeResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_tree_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + else: + (data) = self.get_tree_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + return data + + def get_tree_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 + """Gets the tree 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.get_tree_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 str sha: sha of the commit (required) + :param bool recursive: show all directories and files + :param int page: page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page + :param int per_page: number of items per page; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE + :return: GitTreeResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'sha', 'recursive', 'page', 'per_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 get_tree" % 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 `get_tree`") # 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 `get_tree`") # 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 `get_tree`") # 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 'sha' in params: + path_params['sha'] = params['sha'] # noqa: E501 + + query_params = [] + if 'recursive' in params: + query_params.append(('recursive', params['recursive'])) # noqa: E501 + 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 + + 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}/git/trees/{sha}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GitTreeResponse', # 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 list_forks(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's forks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_forks(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 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. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_forks_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.list_forks_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def list_forks_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's forks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_forks_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 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', '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 list_forks" % 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 `list_forks`") # 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 `list_forks`") # 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 '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}/forks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[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_add_collaborator(self, owner, repo, collaborator, **kwargs): # noqa: E501 + """Add a collaborator to 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_add_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 collaborator: username of the collaborator to add (required) + :param AddCollaboratorOption body: + :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_add_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 + else: + (data) = self.repo_add_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 + return data + + def repo_add_collaborator_with_http_info(self, owner, repo, collaborator, **kwargs): # noqa: E501 + """Add a collaborator to 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_add_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 collaborator: username of the collaborator to add (required) + :param AddCollaboratorOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'collaborator', '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_add_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_add_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_add_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_add_collaborator`") # 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 'collaborator' in params: + path_params['collaborator'] = params['collaborator'] # 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}/collaborators/{collaborator}', '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 repo_add_topc(self, owner, repo, topic, **kwargs): # noqa: E501 + """Add a topic to 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_add_topc(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 str topic: name of the topic to add (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_add_topc_with_http_info(owner, repo, topic, **kwargs) # noqa: E501 + else: + (data) = self.repo_add_topc_with_http_info(owner, repo, topic, **kwargs) # noqa: E501 + return data + + def repo_add_topc_with_http_info(self, owner, repo, topic, **kwargs): # noqa: E501 + """Add a topic to 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_add_topc_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 str topic: name of the topic to add (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'topic'] # 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_add_topc" % 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_add_topc`") # 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_add_topc`") # 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_add_topc`") # 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 'topic' in params: + path_params['topic'] = params['topic'] # 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}/topics/{topic}', '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 repo_check_collaborator(self, owner, repo, collaborator, **kwargs): # noqa: E501 + """Check if a user is a collaborator 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_check_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 collaborator: username of the collaborator (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_check_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 + else: + (data) = self.repo_check_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 + return data + + def repo_check_collaborator_with_http_info(self, owner, repo, collaborator, **kwargs): # noqa: E501 + """Check if a user is a collaborator 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_check_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 collaborator: username of the collaborator (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'collaborator'] # 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_check_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_check_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_check_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_check_collaborator`") # 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 'collaborator' in params: + path_params['collaborator'] = params['collaborator'] # 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}/collaborators/{collaborator}', '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_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 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_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 str filepath: path of the file to create (required) + :param CreateFileOptions body: (required) + :return: FileResponse + 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_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 + return data + + def repo_create_file_with_http_info(self, owner, repo, filepath, body, **kwargs): # noqa: E501 + """Create 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_create_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 str filepath: path of the file to create (required) + :param CreateFileOptions body: (required) + :return: FileResponse + If the method is called asynchronously, + returns the request thread. + """ + + 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') + 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_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_create_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_create_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_create_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_create_file`") # 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 + 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}/contents/{filepath}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileResponse', # 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_hook(self, owner, repo, **kwargs): # noqa: E501 + """Create 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_create_hook(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 CreateHookOption 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_create_hook_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_hook_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_create_hook_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create 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_create_hook_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 CreateHookOption body: + :return: Hook + 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_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_create_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_create_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 + + 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}/hooks', 'POST', + 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_create_key(self, owner, repo, **kwargs): # noqa: E501 + """Add a key to 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_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) + :param CreateKeyOption body: + :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_create_key_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_key_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_create_key_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Add a key to 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_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) + :param CreateKeyOption body: + :return: DeployKey + 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_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_create_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_create_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 = {} + + 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}/keys', 'POST', + 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_create_pull_request(self, owner, repo, **kwargs): # noqa: E501 + """Create 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_create_pull_request(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 CreatePullRequestOption 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_create_pull_request_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_pull_request_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_create_pull_request_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create 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_create_pull_request_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 CreatePullRequestOption body: + :return: PullRequest + 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_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_create_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_create_pull_request`") # 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}/pulls', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _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 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_release(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 CreateReleaseOption 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_create_release_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_release_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_create_release_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create 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_create_release_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 CreateReleaseOption body: + :return: Release + 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_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_create_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_create_release`") # 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}/releases', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def repo_create_release_attachment(self, owner, repo, id, attachment, **kwargs): # noqa: E501 + """Create 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_create_release_attachment(owner, repo, id, attachment, 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 file attachment: attachment to upload (required) + :param str name: name of the attachment + :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_create_release_attachment_with_http_info(owner, repo, id, attachment, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_release_attachment_with_http_info(owner, repo, id, attachment, **kwargs) # noqa: E501 + return data + + def repo_create_release_attachment_with_http_info(self, owner, repo, id, attachment, **kwargs): # noqa: E501 + """Create 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_create_release_attachment_with_http_info(owner, repo, id, attachment, 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 file attachment: attachment to upload (required) + :param str name: name of the attachment + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', 'attachment', '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_create_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_create_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_create_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_create_release_attachment`") # noqa: E501 + # verify the required parameter 'attachment' is set + if ('attachment' not in params or + params['attachment'] is None): + raise ValueError("Missing the required parameter `attachment` when calling `repo_create_release_attachment`") # 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 = [] + if 'name' in params: + query_params.append(('name', params['name'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + if 'attachment' in params: + local_var_files['attachment'] = params['attachment'] # noqa: E501 + + 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 + ['multipart/form-data']) # 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', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def repo_create_status(self, owner, repo, sha, **kwargs): # noqa: E501 + """Create a commit status # 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_status(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 str sha: sha of the commit (required) + :param CreateStatusOption body: + :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_create_status_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_status_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + return data + + def repo_create_status_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 + """Create a commit status # 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_status_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 str sha: sha of the commit (required) + :param CreateStatusOption body: + :return: Status + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'sha', '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_status" % 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_status`") # 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_status`") # 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_create_status`") # 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 'sha' in params: + path_params['sha'] = params['sha'] # 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}/statuses/{sha}', 'POST', + 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_delete(self, owner, repo, **kwargs): # noqa: E501 + """Delete 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(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to delete (required) + :param str repo: name of the repo 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_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_delete_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Delete 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_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to delete (required) + :param str repo: name of the repo to delete (required) + :return: None + 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_delete" % 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`") # 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`") # 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 + # 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}', '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 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_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 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_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 + return data + + 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_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 branch: branch to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'branch'] # 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_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_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_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 = {} + + 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 'branch' in params: + path_params['branch'] = params['branch'] # 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}/branches/{branch}', '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 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_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 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_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + return data + + 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_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: None + 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_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_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_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 = {} + + 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}', '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 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_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 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_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_collaborator_with_http_info(owner, repo, collaborator, **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 + + 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) + >>> 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) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'collaborator'] # 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_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_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_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 = {} + + 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 'collaborator' in params: + path_params['collaborator'] = params['collaborator'] # 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}/collaborators/{collaborator}', '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 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_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 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_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_file_with_http_info(owner, repo, filepath, body, **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 + + 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) + >>> 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 + If the method is called asynchronously, + returns the request thread. + """ + + 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') + 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_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_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_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 = {} + + 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 + 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}/contents/{filepath}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _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 + + 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) + >>> 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: 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 + else: + (data) = self.repo_delete_git_hook_with_http_info(owner, repo, id, **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 + + 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) + >>> 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: None + 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_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_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_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 + + 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}', '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 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_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 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_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_hook_with_http_info(owner, repo, id, **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 + + 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) + >>> 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 + 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_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_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_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 + + 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}', '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 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_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 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_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_key_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 + + 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) + >>> 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) + :return: None + 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_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_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_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_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', '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( + '/repos/{owner}/{repo}/keys/{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 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_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 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_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + return data + + 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_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 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', 'index', '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_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_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_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 = {} + + 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 + # 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/{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 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_delete_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 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_delete_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_release_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 + + 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) + >>> 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) + :return: None + 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_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_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_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 = {} + + 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', '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( + '/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=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_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_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 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_delete_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_release_attachment_with_http_info(owner, repo, id, attachment_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 + + 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) + >>> 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) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + 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') + 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_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_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_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_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 = {} + + 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 + if 'attachment_id' in params: + path_params['attachment_id'] = params['attachment_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}/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=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_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_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 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_delete_topic_with_http_info(owner, repo, topic, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_topic_with_http_info(owner, repo, topic, **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 + + 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) + >>> 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) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'topic'] # 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_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_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_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 = {} + + 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 'topic' in params: + path_params['topic'] = params['topic'] # 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}/topics/{topic}', '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 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(owner, repo, 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 + 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 + else: + (data) = self.repo_edit_with_http_info(owner, repo, **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 + + 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) + >>> 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 + 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_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`") # 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 + + 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}', 'PATCH', + 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_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_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 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_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + else: + (data) = self.repo_edit_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + return data + + 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_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) + :param EditBranchProtectionOption body: + :return: BranchProtection + If the method is called asynchronously, + returns the request thread. + """ + + 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') + 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_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_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_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 = {} + + 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 + 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/{name}', 'PATCH', + 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_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_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) + :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_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_edit_git_hook_with_http_info(owner, repo, 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 + + 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) + >>> 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 + 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 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_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_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_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 + 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}/hooks/git/{id}', 'PATCH', + 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_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_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) + :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_edit_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_edit_hook_with_http_info(owner, repo, id, **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 + + 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) + >>> 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 + 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 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_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_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 = {} + + 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', '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}', '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 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_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 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_edit_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.repo_edit_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + 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_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 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', '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_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_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_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 = {} + + 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}/pulls/{index}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _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 + + 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) + >>> 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 + 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 + else: + (data) = self.repo_edit_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + 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_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 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', '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 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_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_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 = {} + + 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}/releases/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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', True), + _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 + + 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) + >>> 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 + 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 + else: + (data) = self.repo_edit_release_attachment_with_http_info(owner, repo, id, attachment_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 + + 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) + >>> 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 + If the method is called asynchronously, + returns the request thread. + """ + + 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') + 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_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_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_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 = {} + + 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 + if 'attachment_id' in params: + path_params['attachment_id'] = params['attachment_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}/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='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', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + 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(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: 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_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + 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_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: Repository + 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_get" % 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 + # 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 '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 + # 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}', '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_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_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 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_all_commits_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_all_commits_with_http_info(owner, repo, **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 + + 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) + >>> 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 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', 'sha', '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_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_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_all_commits`") # 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 '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 = {} + + 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', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _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 + + 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) + >>> 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 + 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 + else: + (data) = self.repo_get_archive_with_http_info(owner, repo, archive, **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 + + 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) + >>> 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 + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'archive'] # 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_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_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_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 = {} + + 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 'archive' in params: + path_params['archive'] = params['archive'] # 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}/archive/{archive}', '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_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_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 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_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_branch_with_http_info(owner, repo, branch, **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, 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_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 branch: branch to get (required) + :return: Branch + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'branch'] # 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" % 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 + # 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 + + 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 'branch' in params: + path_params['branch'] = params['branch'] # 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}/branches/{branch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + 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_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 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_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_pull_request_with_http_info(owner, repo, index, **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 + + 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) + >>> 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. + """ + + 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 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_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_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 = {} + + 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}/pulls/{index}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + 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_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 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_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + return data + + 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_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 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', 'index', '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_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_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_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_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 + 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}/pulls/{index}/reviews/{id}', 'GET', + 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_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_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 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_pull_review_comments_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_pull_review_comments_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + return data + + 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_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 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', 'index', '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_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_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_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_pull_review_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 + 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}/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='list[PullReviewComment]', # 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_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_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 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_raw_file_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_raw_file_with_http_info(owner, repo, filepath, **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 + + 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) + >>> 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 + 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_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_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_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 = {} + + 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}/raw/{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_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_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 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_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + 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_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 id: id of the release to get (required) + :return: Release + 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_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_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_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 = {} + + 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}/releases/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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', True), + _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 + + 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) + >>> 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 + 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 + else: + (data) = self.repo_get_release_attachment_with_http_info(owner, repo, id, attachment_id, **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 + + 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) + >>> 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 + If the method is called asynchronously, + returns the request thread. + """ + + 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') + 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_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_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_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 = {} + + 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 + if 'attachment_id' in params: + path_params['attachment_id'] = params['attachment_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}/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='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', True), + _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 + + 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) + >>> 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: a git ref or commit sha (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_single_commit_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_single_commit_with_http_info(owner, repo, sha, **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 + + 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) + >>> 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: a git ref or commit sha (required) + :return: Commit + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'sha'] # 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_single_commit" % 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 + # 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 + + 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 'sha' in params: + path_params['sha'] = params['sha'] # 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}/git/commits/{sha}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _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 + + 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) + >>> 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] + 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 + else: + (data) = self.repo_list_all_git_refs_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 + + 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) + >>> 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] + 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_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_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_list_all_git_refs`") # 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 + # 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}/git/refs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + 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_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[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_branch_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_branch_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + 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_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[BranchProtection] + 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_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_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_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 + # 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', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def repo_list_branches(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's branches # 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_branches(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[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_list_branches_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_branches_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_branches_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's branches # 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_branches_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[Branch] + 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_list_branches" % 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_branches`") # 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_branches`") # 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 + # 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}/branches', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Branch]', # 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_collaborators(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's collaborators # 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_collaborators(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 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.repo_list_collaborators_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_collaborators_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_collaborators_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's collaborators # 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_collaborators_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 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', '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_collaborators" % 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_collaborators`") # 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_collaborators`") # 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 '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}/collaborators', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def repo_list_git_hooks(self, owner, repo, **kwargs): # noqa: E501 + """List the Git hooks 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_list_git_hooks(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[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_list_git_hooks_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_git_hooks_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_git_hooks_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List the Git hooks 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_list_git_hooks_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[GitHook] + 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_list_git_hooks" % 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_git_hooks`") # 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_git_hooks`") # 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 + # 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', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[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_list_git_refs(self, owner, repo, ref, **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_list_git_refs(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: part or full name of the ref (required) + :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_list_git_refs_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_git_refs_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 + return data + + def repo_list_git_refs_with_http_info(self, owner, repo, ref, **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_list_git_refs_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: part or full name of the ref (required) + :return: list[Reference] + 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_list_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_list_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_list_git_refs`") # 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_list_git_refs`") # 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 = [] + + 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}/git/refs/{ref}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def repo_list_hooks(self, owner, repo, **kwargs): # noqa: E501 + """List the hooks 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_list_hooks(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 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. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_hooks_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_hooks_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_hooks_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List the hooks 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_list_hooks_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 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', '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_hooks" % 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_hooks`") # 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_hooks`") # 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 '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}/hooks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[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_list_keys(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(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. + """ + kwargs['_return_http_data_only'] = True + 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 + 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_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_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 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', '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') + 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_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_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_pull_requests`") # 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 '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 = {} + + 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}/pulls', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + 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_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 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_reviews_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_pull_reviews_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + 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_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 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', '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 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_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_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 = {} + + 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', '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', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def repo_list_release_attachments(self, owner, repo, id, **kwargs): # noqa: E501 + """List release's attachments # 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_release_attachments(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) + :return: list[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_list_release_attachments_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_release_attachments_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_list_release_attachments_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """List release's attachments # 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_release_attachments_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) + :return: list[Attachment] + 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_list_release_attachments" % 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_release_attachments`") # 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_release_attachments`") # 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_list_release_attachments`") # 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}/releases/{id}/assets', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[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', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def repo_list_releases(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's releases # 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_releases(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 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. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_releases_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_releases_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_releases_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's releases # 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_releases_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 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', 'per_page', '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_releases" % 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_releases`") # 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_releases`") # 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 '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 = {} + + 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}/releases', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[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', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def repo_list_stargazers(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's stargazers # 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_stargazers(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 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.repo_list_stargazers_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_stargazers_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_stargazers_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's stargazers # 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_stargazers_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 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', '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_stargazers" % 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_stargazers`") # 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_stargazers`") # 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 '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}/stargazers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def repo_list_statuses(self, owner, repo, sha, **kwargs): # noqa: E501 + """Get a commit's statuses # 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_statuses(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 str sha: sha of the commit (required) + :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. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_statuses_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_statuses_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + return data + + def repo_list_statuses_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 + """Get a commit's statuses # 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_statuses_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 str sha: sha of the commit (required) + :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', 'sort', 'state', '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_statuses" % 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_statuses`") # 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_statuses`") # 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_list_statuses`") # 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 'sha' in params: + path_params['sha'] = params['sha'] # noqa: E501 + + query_params = [] + 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 = {} + + 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}/statuses/{sha}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[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_list_subscribers(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's watchers # 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_subscribers(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 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.repo_list_subscribers_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_subscribers_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_subscribers_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's watchers # 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_subscribers_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 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', '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_subscribers" % 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_subscribers`") # 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_subscribers`") # 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 '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}/subscribers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def repo_list_tags(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's tags # 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_tags(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 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. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_tags_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_tags_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_tags_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's tags # 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_tags_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 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', '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_tags" % 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_tags`") # 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_tags`") # 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 '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}/tags', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Tag]', # 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_topics(self, owner, repo, **kwargs): # noqa: E501 + """Get list of topics that a repository has # 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_topics(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 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. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_topics_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_topics_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_topics_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get list of topics that a repository has # 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_topics_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 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', '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_topics" % 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_topics`") # 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_topics`") # 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 '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}/topics', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TopicName', # 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_merge_pull_request(self, owner, repo, index, **kwargs): # noqa: E501 + """Merge 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_merge_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 merge (required) + :param MergePullRequestOption body: + :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_merge_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.repo_merge_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def repo_merge_pull_request_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Merge 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_merge_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 int index: index of the pull request to merge (required) + :param MergePullRequestOption body: + :return: None + 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_merge_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_merge_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_merge_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_merge_pull_request`") # 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}/merge', 'POST', + 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_migrate(self, **kwargs): # noqa: E501 + """Migrate a remote git 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_migrate(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param MigrateRepoForm 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.repo_migrate_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.repo_migrate_with_http_info(**kwargs) # noqa: E501 + return data + + def repo_migrate_with_http_info(self, **kwargs): # noqa: E501 + """Migrate a remote git 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_migrate_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param MigrateRepoForm body: + :return: Repository + 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 repo_migrate" % key + ) + params[key] = val + del params['kwargs'] + + 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']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/migrate', '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_mirror_sync(self, owner, repo, **kwargs): # noqa: E501 + """Sync a mirrored 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_mirror_sync(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to sync (required) + :param str repo: name of the repo to sync (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_mirror_sync_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_mirror_sync_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_mirror_sync_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Sync a mirrored 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_mirror_sync_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to sync (required) + :param str repo: name of the repo to sync (required) + :return: None + 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_mirror_sync" % 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_mirror_sync`") # 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_mirror_sync`") # 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 + # 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}/mirror-sync', 'POST', + 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_pull_request_is_merged(self, owner, repo, index, **kwargs): # noqa: E501 + """Check if a pull request has been merged # 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_pull_request_is_merged(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 (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_pull_request_is_merged_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.repo_pull_request_is_merged_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def repo_pull_request_is_merged_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Check if a pull request has been merged # 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_pull_request_is_merged_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 pull request (required) + :return: None + 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 repo_pull_request_is_merged" % 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_pull_request_is_merged`") # 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_pull_request_is_merged`") # 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_pull_request_is_merged`") # 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}/pulls/{index}/merge', '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_search(self, **kwargs): # noqa: E501 + """Search for repositories # 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_search(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str q: keyword + :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 bool is_private: show only pubic, private or all repositories (defaults to all) + :param bool template: include template repositories this user has access to (defaults to true) + :param bool archived: show only archived, non-archived or all repositories (defaults to all) + :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. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_search_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.repo_search_with_http_info(**kwargs) # noqa: E501 + return data + + def repo_search_with_http_info(self, **kwargs): # noqa: E501 + """Search for repositories # 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_search_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str q: keyword + :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 bool is_private: show only pubic, private or all repositories (defaults to all) + :param bool template: include template repositories this user has access to (defaults to true) + :param bool archived: show only archived, non-archived or all repositories (defaults to all) + :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', 'priority_owner_id', 'starred_by', 'private', 'is_private', 'template', 'archived', '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') + 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_search" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'q' in params: + query_params.append(('q', params['q'])) # noqa: E501 + if 'topic' in params: + query_params.append(('topic', params['topic'])) # noqa: E501 + if 'include_desc' in params: + 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 'is_private' in params: + query_params.append(('is_private', params['is_private'])) # noqa: E501 + if 'template' in params: + query_params.append(('template', params['template'])) # noqa: E501 + if 'archived' in params: + query_params.append(('archived', params['archived'])) # noqa: E501 + if 'mode' in params: + query_params.append(('mode', params['mode'])) # noqa: E501 + if 'exclusive' in params: + query_params.append(('exclusive', params['exclusive'])) # noqa: E501 + if 'sort' in params: + 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 = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['text/plain']) # 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}/signing-key.gpg', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + 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_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) + :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_submit_pull_review_with_http_info(owner, repo, index, id, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_submit_pull_review_with_http_info(owner, repo, index, id, body, **kwargs) # noqa: E501 + return data + + 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_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) + :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', '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 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_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_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 = {} + + 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', '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/{id}', '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_test_hook(self, owner, repo, id, **kwargs): # noqa: E501 + """Test a push webhook # 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_test_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 test (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_test_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_test_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_test_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Test a push webhook # 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_test_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 test (required) + :return: None + 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_test_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_test_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_test_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_test_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}/tests', 'POST', + 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_tracked_times(self, owner, repo, **kwargs): # noqa: E501 + """List a repo'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.repo_tracked_times(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 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. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_tracked_times_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_tracked_times_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_tracked_times_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repo'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.repo_tracked_times_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 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', 'user', '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 repo_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 `repo_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 `repo_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 + + 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 = {} + + 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', '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) + + 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 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_update_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 str filepath: path of the file to update (required) + :param UpdateFileOptions body: (required) + :return: FileResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_update_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_update_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 + return data + + def repo_update_file_with_http_info(self, owner, repo, filepath, body, **kwargs): # noqa: E501 + """Update 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_update_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 str filepath: path of the file to update (required) + :param UpdateFileOptions body: (required) + :return: FileResponse + If the method is called asynchronously, + returns the request thread. + """ + + 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') + 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_update_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_update_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_update_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_update_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_update_file`") # 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 + 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}/contents/{filepath}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileResponse', # 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_topics(self, owner, repo, **kwargs): # noqa: E501 + """Replace list of topics 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_update_topics(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 RepoTopicOptions body: + :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_update_topics_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_update_topics_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_update_topics_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Replace list of topics 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_update_topics_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 RepoTopicOptions body: + :return: None + 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_update_topics" % 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_update_topics`") # 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_update_topics`") # 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}/topics', '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 topic_search(self, q, **kwargs): # noqa: E501 + """search topics via keyword # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.topic_search(q, async_req=True) + >>> result = thread.get() + + :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. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.topic_search_with_http_info(q, **kwargs) # noqa: E501 + else: + (data) = self.topic_search_with_http_info(q, **kwargs) # noqa: E501 + return data + + def topic_search_with_http_info(self, q, **kwargs): # noqa: E501 + """search topics via keyword # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.topic_search_with_http_info(q, async_req=True) + >>> result = thread.get() + + :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', '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 topic_search" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'q' is set + if ('q' not in params or + params['q'] is None): + raise ValueError("Missing the required parameter `q` when calling `topic_search`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + 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 = {} + + 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( + '/topics/search', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[TopicResponse]', # 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_current_check_subscription(self, owner, repo, **kwargs): # noqa: E501 + """Check if the current user is watching 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_current_check_subscription(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: WatchInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_check_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.user_current_check_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def user_current_check_subscription_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Check if the current user is watching 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_current_check_subscription_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: WatchInfo + 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 user_current_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 `user_current_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 `user_current_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 + + 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( + '/repos/{owner}/{repo}/subscription', '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 user_current_delete_subscription(self, owner, repo, **kwargs): # noqa: E501 + """Unwatch 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_current_delete_subscription(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: 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_current_delete_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.user_current_delete_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def user_current_delete_subscription_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Unwatch 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_current_delete_subscription_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: None + 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 user_current_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 `user_current_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 `user_current_delete_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 + + 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( + '/repos/{owner}/{repo}/subscription', '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_current_put_subscription(self, owner, repo, **kwargs): # noqa: E501 + """Watch 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_current_put_subscription(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: WatchInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_put_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.user_current_put_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def user_current_put_subscription_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Watch 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_current_put_subscription_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: WatchInfo + 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 user_current_put_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 `user_current_put_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 `user_current_put_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 + + 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( + '/repos/{owner}/{repo}/subscription', 'PUT', + 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 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/giteapython/api/user_api.py b/giteapython/api/user_api.py new file mode 100644 index 0000000..7dc2fe5 --- /dev/null +++ b/giteapython/api/user_api.py @@ -0,0 +1,4592 @@ +# 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 giteapython.api_client import ApiClient + + +class UserApi(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 create_current_user_repo(self, **kwargs): # noqa: E501 + """Create 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.create_current_user_repo(async_req=True) + >>> result = thread.get() + + :param async_req bool + :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_current_user_repo_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.create_current_user_repo_with_http_info(**kwargs) # noqa: E501 + return data + + def create_current_user_repo_with_http_info(self, **kwargs): # noqa: E501 + """Create 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.create_current_user_repo_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateRepoOption body: + :return: Repository + 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 create_current_user_repo" % key + ) + params[key] = val + del params['kwargs'] + + 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']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/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 user_add_email(self, **kwargs): # noqa: E501 + """Add email addresses # 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_add_email(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateEmailOption body: + :return: list[Email] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_add_email_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_add_email_with_http_info(**kwargs) # noqa: E501 + return data + + def user_add_email_with_http_info(self, **kwargs): # noqa: E501 + """Add email addresses # 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_add_email_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateEmailOption body: + :return: list[Email] + 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_add_email" % key + ) + params[key] = val + del params['kwargs'] + + 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/emails', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Email]', # 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_check_following(self, follower, followee, **kwargs): # noqa: E501 + """Check if one user is following another user # 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_check_following(follower, followee, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str follower: username of following user (required) + :param str followee: username of followed 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.user_check_following_with_http_info(follower, followee, **kwargs) # noqa: E501 + else: + (data) = self.user_check_following_with_http_info(follower, followee, **kwargs) # noqa: E501 + return data + + def user_check_following_with_http_info(self, follower, followee, **kwargs): # noqa: E501 + """Check if one user is following another user # 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_check_following_with_http_info(follower, followee, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str follower: username of following user (required) + :param str followee: username of followed user (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['follower', 'followee'] # 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_check_following" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'follower' is set + if ('follower' not in params or + params['follower'] is None): + raise ValueError("Missing the required parameter `follower` when calling `user_check_following`") # noqa: E501 + # verify the required parameter 'followee' is set + if ('followee' not in params or + params['followee'] is None): + raise ValueError("Missing the required parameter `followee` when calling `user_check_following`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'follower' in params: + path_params['follower'] = params['follower'] # noqa: E501 + if 'followee' in params: + path_params['followee'] = params['followee'] # 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( + '/users/{follower}/following/{followee}', '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 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 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_create_token(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :param AccessToken access_token: + :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_create_token_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_create_token_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_create_token_with_http_info(self, username, **kwargs): # noqa: E501 + """Create an access token # 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_token_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :param AccessToken access_token: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'access_token'] # 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_token" % key + ) + params[key] = val + del params['kwargs'] + # 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 `user_create_token`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'access_token' in params: + body_params = params['access_token'] + # 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( + '/users/{username}/tokens', 'POST', + 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_current_check_following(self, username, **kwargs): # noqa: E501 + """Check whether a user is followed by the authenticated user # 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_current_check_following(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of followed 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.user_current_check_following_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_current_check_following_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_current_check_following_with_http_info(self, username, **kwargs): # noqa: E501 + """Check whether a user is followed by the authenticated user # 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_current_check_following_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of followed user (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # 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_current_check_following" % key + ) + params[key] = val + del params['kwargs'] + # 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 `user_current_check_following`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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( + '/user/following/{username}', '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 user_current_check_starring(self, owner, repo, **kwargs): # noqa: E501 + """Whether the authenticated is starring the 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_current_check_starring(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: 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_current_check_starring_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.user_current_check_starring_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def user_current_check_starring_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Whether the authenticated is starring the 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_current_check_starring_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: None + 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 user_current_check_starring" % 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_current_check_starring`") # 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_current_check_starring`") # 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 + # 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( + '/user/starred/{owner}/{repo}', '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 user_current_delete_follow(self, username, **kwargs): # noqa: E501 + """Unfollow a user # 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_current_delete_follow(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user to unfollow (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_current_delete_follow_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_current_delete_follow_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_current_delete_follow_with_http_info(self, username, **kwargs): # noqa: E501 + """Unfollow a user # 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_current_delete_follow_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user to unfollow (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # 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_current_delete_follow" % key + ) + params[key] = val + del params['kwargs'] + # 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 `user_current_delete_follow`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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( + '/user/following/{username}', '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_current_delete_gpg_key(self, id, **kwargs): # noqa: E501 + """Remove a GPG key # 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_current_delete_gpg_key(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of 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.user_current_delete_gpg_key_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.user_current_delete_gpg_key_with_http_info(id, **kwargs) # noqa: E501 + return data + + def user_current_delete_gpg_key_with_http_info(self, id, **kwargs): # noqa: E501 + """Remove a GPG key # 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_current_delete_gpg_key_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of key 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 user_current_delete_gpg_key" % 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_current_delete_gpg_key`") # 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/gpg_keys/{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_current_delete_key(self, id, **kwargs): # noqa: E501 + """Delete a public key # 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_current_delete_key(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of 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.user_current_delete_key_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.user_current_delete_key_with_http_info(id, **kwargs) # noqa: E501 + return data + + def user_current_delete_key_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete a public key # 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_current_delete_key_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of key 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 user_current_delete_key" % 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_current_delete_key`") # 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/keys/{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_current_delete_star(self, owner, repo, **kwargs): # noqa: E501 + """Unstar the given 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_current_delete_star(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to unstar (required) + :param str repo: name of the repo to unstar (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_current_delete_star_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.user_current_delete_star_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def user_current_delete_star_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Unstar the given 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_current_delete_star_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to unstar (required) + :param str repo: name of the repo to unstar (required) + :return: None + 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 user_current_delete_star" % 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_current_delete_star`") # 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_current_delete_star`") # 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 + # 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( + '/user/starred/{owner}/{repo}', '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_current_get_gpg_key(self, id, **kwargs): # noqa: E501 + """Get a GPG key # 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_current_get_gpg_key(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of key to get (required) + :return: GPGKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_get_gpg_key_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.user_current_get_gpg_key_with_http_info(id, **kwargs) # noqa: E501 + return data + + def user_current_get_gpg_key_with_http_info(self, id, **kwargs): # noqa: E501 + """Get a GPG key # 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_current_get_gpg_key_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of key to get (required) + :return: GPGKey + 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_current_get_gpg_key" % 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_current_get_gpg_key`") # 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/gpg_keys/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GPGKey', # 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_current_get_key(self, id, **kwargs): # noqa: E501 + """Get a public key # 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_current_get_key(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of key to get (required) + :return: PublicKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_get_key_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.user_current_get_key_with_http_info(id, **kwargs) # noqa: E501 + return data + + def user_current_get_key_with_http_info(self, id, **kwargs): # noqa: E501 + """Get a public key # 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_current_get_key_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of key to get (required) + :return: PublicKey + 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_current_get_key" % 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_current_get_key`") # 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/keys/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PublicKey', # 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_current_list_followers(self, **kwargs): # noqa: E501 + """List the authenticated user's followers # 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_current_list_followers(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[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_list_followers_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_list_followers_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_list_followers_with_http_info(self, **kwargs): # noqa: E501 + """List the authenticated user's followers # 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_current_list_followers_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[User] + 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_current_list_followers" % 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/followers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def user_current_list_following(self, **kwargs): # noqa: E501 + """List the users that the authenticated user is following # 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_current_list_following(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[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_list_following_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_list_following_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_list_following_with_http_info(self, **kwargs): # noqa: E501 + """List the users that the authenticated user is following # 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_current_list_following_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[User] + 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_current_list_following" % 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/following', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def user_current_list_gpg_keys(self, **kwargs): # noqa: E501 + """List the authenticated user's GPG 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.user_current_list_gpg_keys(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[GPGKey] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_list_gpg_keys_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_list_gpg_keys_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_list_gpg_keys_with_http_info(self, **kwargs): # noqa: E501 + """List the authenticated user's GPG 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.user_current_list_gpg_keys_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[GPGKey] + 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_current_list_gpg_keys" % 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/gpg_keys', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[GPGKey]', # 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_current_list_keys(self, **kwargs): # noqa: E501 + """List the authenticated user's public 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.user_current_list_keys(async_req=True) + >>> result = thread.get() + + :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. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_list_keys_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_list_keys_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_list_keys_with_http_info(self, **kwargs): # noqa: E501 + """List the authenticated user's public 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.user_current_list_keys_with_http_info(async_req=True) + >>> result = thread.get() + + :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', '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_current_list_keys" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + 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 = {} + + 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/keys', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[PublicKey]', # 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_current_list_repos(self, **kwargs): # noqa: E501 + """List the repos that the authenticated user owns or 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.user_current_list_repos(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[Repository] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_list_repos_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_list_repos_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_list_repos_with_http_info(self, **kwargs): # noqa: E501 + """List the repos that the authenticated user owns or 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.user_current_list_repos_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[Repository] + 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_current_list_repos" % 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/repos', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[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 user_current_list_starred(self, **kwargs): # noqa: E501 + """The repos that the authenticated user has starred # 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_current_list_starred(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[Repository] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_list_starred_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_list_starred_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_list_starred_with_http_info(self, **kwargs): # noqa: E501 + """The repos that the authenticated user has starred # 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_current_list_starred_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[Repository] + 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_current_list_starred" % 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/starred', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[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 user_current_list_subscriptions(self, **kwargs): # noqa: E501 + """List repositories watched by the authenticated user # 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_current_list_subscriptions(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[Repository] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_list_subscriptions_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_list_subscriptions_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_list_subscriptions_with_http_info(self, **kwargs): # noqa: E501 + """List repositories watched by the authenticated user # 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_current_list_subscriptions_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[Repository] + 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_current_list_subscriptions" % 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/subscriptions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[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 user_current_post_gpg_key(self, **kwargs): # noqa: E501 + """Create a GPG key # 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_current_post_gpg_key(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateGPGKeyOption form: + :return: GPGKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_post_gpg_key_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_post_gpg_key_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_post_gpg_key_with_http_info(self, **kwargs): # noqa: E501 + """Create a GPG key # 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_current_post_gpg_key_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateGPGKeyOption form: + :return: GPGKey + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['form'] # 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_current_post_gpg_key" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'form' in params: + body_params = params['form'] + # 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/gpg_keys', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GPGKey', # 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_current_post_key(self, **kwargs): # noqa: E501 + """Create a public key # 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_current_post_key(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateKeyOption body: + :return: PublicKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_post_key_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_post_key_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_post_key_with_http_info(self, **kwargs): # noqa: E501 + """Create a public key # 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_current_post_key_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateKeyOption body: + :return: PublicKey + 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_current_post_key" % key + ) + params[key] = val + del params['kwargs'] + + 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']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/keys', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PublicKey', # 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_current_put_follow(self, username, **kwargs): # noqa: E501 + """Follow a user # 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_current_put_follow(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user to follow (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_current_put_follow_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_current_put_follow_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_current_put_follow_with_http_info(self, username, **kwargs): # noqa: E501 + """Follow a user # 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_current_put_follow_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user to follow (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # 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_current_put_follow" % key + ) + params[key] = val + del params['kwargs'] + # 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 `user_current_put_follow`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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( + '/user/following/{username}', '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 user_current_put_star(self, owner, repo, **kwargs): # noqa: E501 + """Star the given 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_current_put_star(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to star (required) + :param str repo: name of the repo to star (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_current_put_star_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.user_current_put_star_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def user_current_put_star_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Star the given 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_current_put_star_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to star (required) + :param str repo: name of the repo to star (required) + :return: None + 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 user_current_put_star" % 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_current_put_star`") # 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_current_put_star`") # 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 + # 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( + '/user/starred/{owner}/{repo}', '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 user_current_tracked_times(self, **kwargs): # noqa: E501 + """List the current user'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.user_current_tracked_times(async_req=True) + >>> 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. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_tracked_times_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_tracked_times_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_tracked_times_with_http_info(self, **kwargs): # noqa: E501 + """List the current user'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.user_current_tracked_times_with_http_info(async_req=True) + >>> 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 = ['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 user_current_tracked_times" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + 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 = {} + + 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/times', '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) + + def user_delete_access_token(self, username, token, **kwargs): # noqa: E501 + """delete an access token # 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_access_token(username, token, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :param int token: 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_access_token_with_http_info(username, token, **kwargs) # noqa: E501 + else: + (data) = self.user_delete_access_token_with_http_info(username, token, **kwargs) # noqa: E501 + return data + + def user_delete_access_token_with_http_info(self, username, token, **kwargs): # noqa: E501 + """delete an access token # 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_access_token_with_http_info(username, token, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user (required) + :param int token: token to be deleted (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'token'] # 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_access_token" % key + ) + params[key] = val + del params['kwargs'] + # 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 `user_delete_access_token`") # noqa: E501 + # verify the required parameter 'token' is set + if ('token' not in params or + params['token'] is None): + raise ValueError("Missing the required parameter `token` when calling `user_delete_access_token`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + if 'token' in params: + path_params['token'] = params['token'] # 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( + '/users/{username}/tokens/{token}', '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_delete_email(self, **kwargs): # noqa: E501 + """Delete email addresses # 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_email(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param DeleteEmailOption body: + :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_email_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_delete_email_with_http_info(**kwargs) # noqa: E501 + return data + + def user_delete_email_with_http_info(self, **kwargs): # noqa: E501 + """Delete email addresses # 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_email_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param DeleteEmailOption body: + :return: None + 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_delete_email" % key + ) + params[key] = val + del params['kwargs'] + + 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/emails', '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_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 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_get(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user to get (required) + :return: User + 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_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_get_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_get_with_http_info(self, username, **kwargs): # noqa: E501 + """Get a user # 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_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user to get (required) + :return: User + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # 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" % key + ) + params[key] = val + del params['kwargs'] + # 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 `user_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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( + '/users/{username}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='User', # 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_current(self, **kwargs): # noqa: E501 + """Get the authenticated user # 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_current(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: User + 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_current_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_get_current_with_http_info(**kwargs) # noqa: E501 + return data + + def user_get_current_with_http_info(self, **kwargs): # noqa: E501 + """Get the authenticated user # 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_current_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: User + 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 user_get_current" % 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']) # 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', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='User', # 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_heatmap_data(self, username, **kwargs): # noqa: E501 + """Get a user's heatmap # 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_heatmap_data(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user to get (required) + :return: list[UserHeatmapData] + 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_heatmap_data_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_get_heatmap_data_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_get_heatmap_data_with_http_info(self, username, **kwargs): # noqa: E501 + """Get a user's heatmap # 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_heatmap_data_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of user to get (required) + :return: list[UserHeatmapData] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # 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_heatmap_data" % key + ) + params[key] = val + del params['kwargs'] + # 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 `user_get_heatmap_data`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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( + '/users/{username}/heatmap', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UserHeatmapData]', # 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_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 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_get_tokens(username, async_req=True) + >>> result = thread.get() + + :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. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_get_tokens_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_get_tokens_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_get_tokens_with_http_info(self, username, **kwargs): # noqa: E501 + """List the authenticated user's access tokens # 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_tokens_with_http_info(username, async_req=True) + >>> result = thread.get() + + :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', '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_tokens" % key + ) + params[key] = val + del params['kwargs'] + # 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 `user_get_tokens`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + 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 = {} + + 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( + '/users/{username}/tokens', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[AccessToken]', # 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_list_emails(self, **kwargs): # noqa: E501 + """List the authenticated user's email addresses # 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_list_emails(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[Email] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_emails_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_list_emails_with_http_info(**kwargs) # noqa: E501 + return data + + def user_list_emails_with_http_info(self, **kwargs): # noqa: E501 + """List the authenticated user's email addresses # 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_list_emails_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[Email] + 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 user_list_emails" % 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']) # 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/emails', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Email]', # 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_list_followers(self, username, **kwargs): # noqa: E501 + """List the given user's followers # 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_list_followers(username, async_req=True) + >>> result = thread.get() + + :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. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_followers_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_list_followers_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_list_followers_with_http_info(self, username, **kwargs): # noqa: E501 + """List the given user's followers # 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_list_followers_with_http_info(username, async_req=True) + >>> result = thread.get() + + :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', '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_list_followers" % key + ) + params[key] = val + del params['kwargs'] + # 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 `user_list_followers`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + 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 = {} + + 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( + '/users/{username}/followers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def user_list_following(self, username, **kwargs): # noqa: E501 + """List the users that the given user is following # 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_list_following(username, async_req=True) + >>> result = thread.get() + + :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. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_following_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_list_following_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_list_following_with_http_info(self, username, **kwargs): # noqa: E501 + """List the users that the given user is following # 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_list_following_with_http_info(username, async_req=True) + >>> result = thread.get() + + :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', '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_list_following" % key + ) + params[key] = val + del params['kwargs'] + # 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 `user_list_following`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + 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 = {} + + 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( + '/users/{username}/following', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def user_list_gpg_keys(self, username, **kwargs): # noqa: E501 + """List the given user's GPG 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.user_list_gpg_keys(username, async_req=True) + >>> result = thread.get() + + :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. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_gpg_keys_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_list_gpg_keys_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_list_gpg_keys_with_http_info(self, username, **kwargs): # noqa: E501 + """List the given user's GPG 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.user_list_gpg_keys_with_http_info(username, async_req=True) + >>> result = thread.get() + + :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', '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_list_gpg_keys" % key + ) + params[key] = val + del params['kwargs'] + # 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 `user_list_gpg_keys`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + 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 = {} + + 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( + '/users/{username}/gpg_keys', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[GPGKey]', # 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_list_keys(self, username, **kwargs): # noqa: E501 + """List the given user's public 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.user_list_keys(username, async_req=True) + >>> result = thread.get() + + :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. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_keys_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_list_keys_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_list_keys_with_http_info(self, username, **kwargs): # noqa: E501 + """List the given user's public 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.user_list_keys_with_http_info(username, async_req=True) + >>> result = thread.get() + + :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', '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_list_keys" % key + ) + params[key] = val + del params['kwargs'] + # 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 `user_list_keys`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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 = {} + + 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( + '/users/{username}/keys', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[PublicKey]', # 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_list_repos(self, username, **kwargs): # noqa: E501 + """List the repos owned by the given user # 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_list_repos(username, async_req=True) + >>> result = thread.get() + + :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. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_repos_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_list_repos_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_list_repos_with_http_info(self, username, **kwargs): # noqa: E501 + """List the repos owned by the given user # 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_list_repos_with_http_info(username, async_req=True) + >>> result = thread.get() + + :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', '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_list_repos" % key + ) + params[key] = val + del params['kwargs'] + # 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 `user_list_repos`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + 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 = {} + + 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( + '/users/{username}/repos', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[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 user_list_starred(self, username, **kwargs): # noqa: E501 + """The repos that the given user has starred # 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_list_starred(username, async_req=True) + >>> result = thread.get() + + :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. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_starred_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_list_starred_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_list_starred_with_http_info(self, username, **kwargs): # noqa: E501 + """The repos that the given user has starred # 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_list_starred_with_http_info(username, async_req=True) + >>> result = thread.get() + + :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', '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_list_starred" % key + ) + params[key] = val + del params['kwargs'] + # 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 `user_list_starred`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + 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 = {} + + 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( + '/users/{username}/starred', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[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 user_list_subscriptions(self, username, **kwargs): # noqa: E501 + """List the repositories watched by a user # 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_list_subscriptions(username, async_req=True) + >>> result = thread.get() + + :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. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_subscriptions_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_list_subscriptions_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_list_subscriptions_with_http_info(self, username, **kwargs): # noqa: E501 + """List the repositories watched by a user # 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_list_subscriptions_with_http_info(username, async_req=True) + >>> result = thread.get() + + :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', '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_list_subscriptions" % key + ) + params[key] = val + del params['kwargs'] + # 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 `user_list_subscriptions`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + 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 = {} + + 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( + '/users/{username}/subscriptions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[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 user_list_teams(self, **kwargs): # noqa: E501 + """List all the teams a user belongs 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.user_list_teams(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[Team] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_teams_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_list_teams_with_http_info(**kwargs) # noqa: E501 + return data + + def user_list_teams_with_http_info(self, **kwargs): # noqa: E501 + """List all the teams a user belongs 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.user_list_teams_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[Team] + 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_list_teams" % 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/teams', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[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 user_search(self, **kwargs): # noqa: E501 + """Search for users # 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_search(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str q: keyword + :param int uid: ID of the user to search for + :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. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_search_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_search_with_http_info(**kwargs) # noqa: E501 + return data + + def user_search_with_http_info(self, **kwargs): # noqa: E501 + """Search for users # 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_search_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str q: keyword + :param int uid: ID of the user to search for + :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', '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_search" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'q' in params: + 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 + + 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( + '/users/search', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InlineResponse2001', # 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_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_update_o_auth2_application(id, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :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_update_o_auth2_application_with_http_info(id, body, **kwargs) # noqa: E501 + else: + (data) = self.user_update_o_auth2_application_with_http_info(id, body, **kwargs) # noqa: E501 + return data + + 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_update_o_auth2_application_with_http_info(id, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :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 = ['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 user_update_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_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 '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', '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}', 'PATCH', + 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) diff --git a/giteapython/api_client.py b/giteapython/api_client.py new file mode 100644 index 0000000..c445d3c --- /dev/null +++ b/giteapython/api_client.py @@ -0,0 +1,638 @@ +# 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 datetime +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import quote + +from giteapython.configuration import Configuration +import giteapython.models +from giteapython import rest + + +class ApiClient(object): + """Generic API client for Swagger client library builds. + + Swagger generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the Swagger + templates. + + NOTE: This class is auto generated by the swagger code generator program. + Ref: https://github.com/swagger-api/swagger-codegen + Do not edit the class manually. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if six.PY3 else long, # noqa: F821 + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None): + if configuration is None: + configuration = Configuration() + self.configuration = configuration + + # Use the pool property to lazily initialize the ThreadPool. + self._pool = None + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'Swagger-Codegen/1.0.0/python' + + def __del__(self): + if self._pool is not None: + self._pool.close() + self._pool.join() + + @property + def pool(self): + if self._pool is None: + self._pool = ThreadPool() + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_type=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + query_params = self.parameters_to_tuples(query_params, + collection_formats) + + # post parameters + if post_params or files: + post_params = self.prepare_post_parameters(post_params, files) + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + + # auth setting + self.update_params_for_auth(header_params, query_params, auth_settings) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + url = self.configuration.host + resource_path + + # perform request and return response + response_data = self.request( + method, url, query_params=query_params, headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + + self.last_response = response_data + + return_data = response_data + if _preload_content: + # deserialize response data + if response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return (return_data) + else: + return (return_data, response_data.status, + response_data.getheaders()) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is swagger model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `swagger_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) + for attr, _ in six.iteritems(obj.swagger_types) + if getattr(obj, attr) is not None} + + return {key: self.sanitize_for_serialization(val) + for key, val in six.iteritems(obj_dict)} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('list['): + sub_kls = re.match(r'list\[(.*)\]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('dict('): + sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in six.iteritems(data)} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(giteapython.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datatime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_type=None, auth_settings=None, async_req=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_type, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout) + else: + thread = self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, query_params, + header_params, body, + post_params, files, + response_type, auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, _request_timeout)) + return thread + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.GET(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.HEAD(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.OPTIONS(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "POST": + return self.rest_client.POST(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.PUT(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.PATCH(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.DELETE(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def prepare_post_parameters(self, post_params=None, files=None): + """Builds form parameters. + + :param post_params: Normal form parameters. + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if post_params: + params = post_params + + if files: + for k, v in six.iteritems(files): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + accepts = [x.lower() for x in accepts] + + if 'application/json' in accepts: + return 'application/json' + else: + return ', '.join(accepts) + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return 'application/json' + + content_types = [x.lower() for x in content_types] + + if 'application/json' in content_types or '*/*' in content_types: + return 'application/json' + else: + return content_types[0] + + def update_params_for_auth(self, headers, querys, auth_settings): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param querys: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + """ + if not auth_settings: + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + if not auth_setting['value']: + continue + elif auth_setting['in'] == 'header': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + querys.append((auth_setting['key'], auth_setting['value'])) + else: + raise ValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return six.text_type(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return a original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + from dateutil.parser import parse + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datatime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + from dateutil.parser import parse + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __hasattr(self, object, name): + return name in object.__class__.__dict__ + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + if (not klass.swagger_types and + not self.__hasattr(klass, 'get_real_child_model')): + return data + + kwargs = {} + if klass.swagger_types is not None: + for attr, attr_type in six.iteritems(klass.swagger_types): + if (data is not None and + klass.attribute_map[attr] in data and + isinstance(data, (list, dict))): + value = data[klass.attribute_map[attr]] + kwargs[attr] = self.__deserialize(value, attr_type) + + instance = klass(**kwargs) + + if (isinstance(instance, dict) and + klass.swagger_types is not None and + isinstance(data, dict)): + for key, value in data.items(): + if key not in klass.swagger_types: + instance[key] = value + if self.__hasattr(instance, 'get_real_child_model'): + klass_name = instance.get_real_child_model(data) + if klass_name: + instance = self.__deserialize(data, klass_name) + return instance diff --git a/giteapython/configuration.py b/giteapython/configuration.py new file mode 100644 index 0000000..35e2844 --- /dev/null +++ b/giteapython/configuration.py @@ -0,0 +1,287 @@ +# 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 copy +import logging +import multiprocessing +import sys +import urllib3 + +import six +from six.moves import http_client as httplib + + +class Configuration(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Ref: https://github.com/swagger-api/swagger-codegen + Do not edit the class manually. + """ + + _default = None + + def __init__(self): + """Constructor""" + if self._default: + for key in self._default.__dict__.keys(): + self.__dict__[key] = copy.copy(self._default.__dict__[key]) + return + + # Default Base url + self.host = "http://localhost/api/v1" + # Temp file folder for downloading files + self.temp_folder_path = None + + # Authentication Settings + # dict to store API key(s) + 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 + self.password = "" + + # Logging Settings + self.logger = {} + self.logger["package_logger"] = logging.getLogger("giteapython") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + # Log format + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + # Log stream handler + self.logger_stream_handler = None + # Log file handler + self.logger_file_handler = None + # Debug file location + self.logger_file = None + # Debug switch + self.debug = False + + # SSL/TLS verification + # Set this to false to skip verifying SSL certificate when calling API + # from https server. + self.verify_ssl = True + # Set this to customize the certificate file to verify the peer. + self.ssl_ca_cert = None + # client certificate file + self.cert_file = None + # client key file + self.key_file = None + # Set this to True/False to enable/disable SSL hostname verification. + self.assert_hostname = None + + # urllib3 connection pool's maximum number of connections saved + # per pool. urllib3 uses 1 connection as default value, but this is + # not the best value when you are making a lot of possibly parallel + # requests to the same host, which is often the case here. + # cpu_count * 5 is used as default value to increase performance. + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + + # Proxy URL + self.proxy = None + # Safe chars for path_param + self.safe_chars_for_path_param = '' + + @classmethod + def set_default(cls, default): + cls._default = default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in six.iteritems(self.logger): + logger.addHandler(self.logger_file_handler) + if self.logger_stream_handler: + logger.removeHandler(self.logger_stream_handler) + else: + # If not set logging file, + # then add stream handler and remove file handler. + self.logger_stream_handler = logging.StreamHandler() + self.logger_stream_handler.setFormatter(self.logger_formatter) + for _, logger in six.iteritems(self.logger): + logger.addHandler(self.logger_stream_handler) + if self.logger_file_handler: + logger.removeHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :return: The token for api key authentication. + """ + + 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. + """ + return urllib3.util.make_headers( + basic_auth=self.username + ':' + self.password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + return { + 'AccessToken': + { + 'type': 'api_key', + 'in': 'query', + 'key': 'access_token', + 'value': self.get_api_key_with_prefix('access_token') + }, + 'AuthorizationHeaderToken': + { + 'type': 'api_key', + 'in': 'header', + 'key': 'Authorization', + 'value': self.get_api_key_with_prefix('Authorization') + }, + 'BasicAuth': + { + 'type': 'basic', + 'in': 'header', + 'key': 'Authorization', + 'value': self.get_basic_auth_token() + }, + 'SudoHeader': + { + 'type': 'api_key', + 'in': 'header', + 'key': 'Sudo', + 'value': self.get_api_key_with_prefix('Sudo') + }, + 'SudoParam': + { + 'type': 'api_key', + 'in': 'query', + 'key': 'sudo', + 'value': self.get_api_key_with_prefix('sudo') + }, + 'Token': + { + 'type': 'api_key', + 'in': 'query', + 'key': 'token', + 'value': self.get_api_key_with_prefix('token') + }, + + } + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.1.1\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) diff --git a/giteapython/models/__init__.py b/giteapython/models/__init__.py new file mode 100644 index 0000000..03f7616 --- /dev/null +++ b/giteapython/models/__init__.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +# flake8: noqa +""" + 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 models into model package +from giteapython.models.api_error import APIError +from giteapython.models.access_token import AccessToken +from giteapython.models.add_collaborator_option import AddCollaboratorOption +from giteapython.models.add_time_option import AddTimeOption +from giteapython.models.annotated_tag import AnnotatedTag +from giteapython.models.annotated_tag_object import AnnotatedTagObject +from giteapython.models.attachment import Attachment +from giteapython.models.branch import Branch +from giteapython.models.branch_protection import BranchProtection +from giteapython.models.comment import Comment +from giteapython.models.commit import Commit +from giteapython.models.commit_date_options import CommitDateOptions +from giteapython.models.commit_meta import CommitMeta +from giteapython.models.commit_user import CommitUser +from giteapython.models.contents_response import ContentsResponse +from giteapython.models.create_branch_protection_option import CreateBranchProtectionOption +from giteapython.models.create_email_option import CreateEmailOption +from giteapython.models.create_file_options import CreateFileOptions +from giteapython.models.create_fork_option import CreateForkOption +from giteapython.models.create_gpg_key_option import CreateGPGKeyOption +from giteapython.models.create_hook_option import CreateHookOption +from giteapython.models.create_hook_option_config import CreateHookOptionConfig +from giteapython.models.create_issue_comment_option import CreateIssueCommentOption +from giteapython.models.create_issue_option import CreateIssueOption +from giteapython.models.create_key_option import CreateKeyOption +from giteapython.models.create_label_option import CreateLabelOption +from giteapython.models.create_milestone_option import CreateMilestoneOption +from giteapython.models.create_o_auth2_application_options import CreateOAuth2ApplicationOptions +from giteapython.models.create_org_option import CreateOrgOption +from giteapython.models.create_pull_request_option import CreatePullRequestOption +from giteapython.models.create_pull_review_comment import CreatePullReviewComment +from giteapython.models.create_pull_review_options import CreatePullReviewOptions +from giteapython.models.create_release_option import CreateReleaseOption +from giteapython.models.create_repo_option import CreateRepoOption +from giteapython.models.create_status_option import CreateStatusOption +from giteapython.models.create_team_option import CreateTeamOption +from giteapython.models.create_user_option import CreateUserOption +from giteapython.models.delete_email_option import DeleteEmailOption +from giteapython.models.delete_file_options import DeleteFileOptions +from giteapython.models.deploy_key import DeployKey +from giteapython.models.edit_attachment_options import EditAttachmentOptions +from giteapython.models.edit_branch_protection_option import EditBranchProtectionOption +from giteapython.models.edit_deadline_option import EditDeadlineOption +from giteapython.models.edit_git_hook_option import EditGitHookOption +from giteapython.models.edit_hook_option import EditHookOption +from giteapython.models.edit_issue_comment_option import EditIssueCommentOption +from giteapython.models.edit_issue_option import EditIssueOption +from giteapython.models.edit_label_option import EditLabelOption +from giteapython.models.edit_milestone_option import EditMilestoneOption +from giteapython.models.edit_org_option import EditOrgOption +from giteapython.models.edit_pull_request_option import EditPullRequestOption +from giteapython.models.edit_reaction_option import EditReactionOption +from giteapython.models.edit_release_option import EditReleaseOption +from giteapython.models.edit_repo_option import EditRepoOption +from giteapython.models.edit_team_option import EditTeamOption +from giteapython.models.edit_user_option import EditUserOption +from giteapython.models.email import Email +from giteapython.models.external_tracker import ExternalTracker +from giteapython.models.external_wiki import ExternalWiki +from giteapython.models.file_commit_response import FileCommitResponse +from giteapython.models.file_delete_response import FileDeleteResponse +from giteapython.models.file_links_response import FileLinksResponse +from giteapython.models.file_response import FileResponse +from giteapython.models.gpg_key import GPGKey +from giteapython.models.gpg_key_email import GPGKeyEmail +from giteapython.models.git_blob_response import GitBlobResponse +from giteapython.models.git_entry import GitEntry +from giteapython.models.git_hook import GitHook +from giteapython.models.git_object import GitObject +from giteapython.models.git_tree_response import GitTreeResponse +from giteapython.models.hook import Hook +from giteapython.models.identity import Identity +from giteapython.models.inline_response200 import InlineResponse200 +from giteapython.models.inline_response2001 import InlineResponse2001 +from giteapython.models.internal_tracker import InternalTracker +from giteapython.models.issue import Issue +from giteapython.models.issue_deadline import IssueDeadline +from giteapython.models.issue_labels_option import IssueLabelsOption +from giteapython.models.label import Label +from giteapython.models.markdown_option import MarkdownOption +from giteapython.models.merge_pull_request_option import MergePullRequestOption +from giteapython.models.migrate_repo_form import MigrateRepoForm +from giteapython.models.milestone import Milestone +from giteapython.models.notification_count import NotificationCount +from giteapython.models.notification_subject import NotificationSubject +from giteapython.models.notification_thread import NotificationThread +from giteapython.models.o_auth2_application import OAuth2Application +from giteapython.models.organization import Organization +from giteapython.models.pr_branch_info import PRBranchInfo +from giteapython.models.payload_commit import PayloadCommit +from giteapython.models.payload_commit_verification import PayloadCommitVerification +from giteapython.models.payload_user import PayloadUser +from giteapython.models.permission import Permission +from giteapython.models.public_key import PublicKey +from giteapython.models.pull_request import PullRequest +from giteapython.models.pull_request_meta import PullRequestMeta +from giteapython.models.pull_review import PullReview +from giteapython.models.pull_review_comment import PullReviewComment +from giteapython.models.reaction import Reaction +from giteapython.models.reference import Reference +from giteapython.models.release import Release +from giteapython.models.repo_commit import RepoCommit +from giteapython.models.repo_topic_options import RepoTopicOptions +from giteapython.models.repository import Repository +from giteapython.models.repository_meta import RepositoryMeta +from giteapython.models.review_state_type import ReviewStateType +from giteapython.models.search_results import SearchResults +from giteapython.models.server_version import ServerVersion +from giteapython.models.state_type import StateType +from giteapython.models.status import Status +from giteapython.models.status_state import StatusState +from giteapython.models.stop_watch import StopWatch +from giteapython.models.submit_pull_review_options import SubmitPullReviewOptions +from giteapython.models.tag import Tag +from giteapython.models.team import Team +from giteapython.models.time_stamp import TimeStamp +from giteapython.models.topic_name import TopicName +from giteapython.models.topic_response import TopicResponse +from giteapython.models.tracked_time import TrackedTime +from giteapython.models.transfer_repo_option import TransferRepoOption +from giteapython.models.update_file_options import UpdateFileOptions +from giteapython.models.user import User +from giteapython.models.user_heatmap_data import UserHeatmapData +from giteapython.models.watch_info import WatchInfo diff --git a/giteapython/models/access_token.py b/giteapython/models/access_token.py new file mode 100644 index 0000000..069727d --- /dev/null +++ b/giteapython/models/access_token.py @@ -0,0 +1,116 @@ +# 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 AccessToken(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' + } + + attribute_map = { + 'name': 'name' + } + + def __init__(self, name=None): # noqa: E501 + """AccessToken - a model defined in Swagger""" # noqa: E501 + + self._name = None + self.discriminator = None + + self.name = name + + @property + def name(self): + """Gets the name of this AccessToken. # noqa: E501 + + + :return: The name of this AccessToken. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this AccessToken. + + + :param name: The name of this AccessToken. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + 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(AccessToken, 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, AccessToken): + 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/giteapython/models/add_collaborator_option.py b/giteapython/models/add_collaborator_option.py new file mode 100644 index 0000000..32f942e --- /dev/null +++ b/giteapython/models/add_collaborator_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 AddCollaboratorOption(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 = { + 'permission': 'str' + } + + attribute_map = { + 'permission': 'permission' + } + + def __init__(self, permission=None): # noqa: E501 + """AddCollaboratorOption - a model defined in Swagger""" # noqa: E501 + + self._permission = None + self.discriminator = None + + if permission is not None: + self.permission = permission + + @property + def permission(self): + """Gets the permission of this AddCollaboratorOption. # noqa: E501 + + + :return: The permission of this AddCollaboratorOption. # noqa: E501 + :rtype: str + """ + return self._permission + + @permission.setter + def permission(self, permission): + """Sets the permission of this AddCollaboratorOption. + + + :param permission: The permission of this AddCollaboratorOption. # noqa: E501 + :type: str + """ + + self._permission = permission + + 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(AddCollaboratorOption, 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, AddCollaboratorOption): + 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/giteapython/models/add_time_option.py b/giteapython/models/add_time_option.py new file mode 100644 index 0000000..9421ff2 --- /dev/null +++ b/giteapython/models/add_time_option.py @@ -0,0 +1,172 @@ +# 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 AddTimeOption(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', + 'time': 'int', + 'user_name': 'str' + } + + attribute_map = { + 'created': 'created', + 'time': 'time', + 'user_name': 'user_name' + } + + 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): + """Gets the time of this AddTimeOption. # noqa: E501 + + time in seconds # noqa: E501 + + :return: The time of this AddTimeOption. # noqa: E501 + :rtype: int + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this AddTimeOption. + + time in seconds # noqa: E501 + + :param time: The time of this AddTimeOption. # noqa: E501 + :type: int + """ + if time is None: + raise ValueError("Invalid value for `time`, must not be `None`") # noqa: E501 + + 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 = {} + + 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(AddTimeOption, 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, AddTimeOption): + 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/giteapython/models/annotated_tag.py b/giteapython/models/annotated_tag.py new file mode 100644 index 0000000..97fb6e5 --- /dev/null +++ b/giteapython/models/annotated_tag.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 AnnotatedTag(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 = { + 'message': 'str', + 'object': 'AnnotatedTagObject', + 'sha': 'str', + 'tag': 'str', + 'tagger': 'CommitUser', + 'url': 'str', + 'verification': 'PayloadCommitVerification' + } + + attribute_map = { + 'message': 'message', + 'object': 'object', + 'sha': 'sha', + 'tag': 'tag', + 'tagger': 'tagger', + 'url': 'url', + 'verification': 'verification' + } + + def __init__(self, message=None, object=None, sha=None, tag=None, tagger=None, url=None, verification=None): # noqa: E501 + """AnnotatedTag - a model defined in Swagger""" # noqa: E501 + + self._message = None + self._object = None + self._sha = None + self._tag = None + self._tagger = None + self._url = None + self._verification = None + self.discriminator = None + + if message is not None: + self.message = message + if object is not None: + self.object = object + if sha is not None: + self.sha = sha + if tag is not None: + self.tag = tag + if tagger is not None: + self.tagger = tagger + if url is not None: + self.url = url + if verification is not None: + self.verification = verification + + @property + def message(self): + """Gets the message of this AnnotatedTag. # noqa: E501 + + + :return: The message of this AnnotatedTag. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this AnnotatedTag. + + + :param message: The message of this AnnotatedTag. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def object(self): + """Gets the object of this AnnotatedTag. # noqa: E501 + + + :return: The object of this AnnotatedTag. # noqa: E501 + :rtype: AnnotatedTagObject + """ + return self._object + + @object.setter + def object(self, object): + """Sets the object of this AnnotatedTag. + + + :param object: The object of this AnnotatedTag. # noqa: E501 + :type: AnnotatedTagObject + """ + + self._object = object + + @property + def sha(self): + """Gets the sha of this AnnotatedTag. # noqa: E501 + + + :return: The sha of this AnnotatedTag. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this AnnotatedTag. + + + :param sha: The sha of this AnnotatedTag. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def tag(self): + """Gets the tag of this AnnotatedTag. # noqa: E501 + + + :return: The tag of this AnnotatedTag. # noqa: E501 + :rtype: str + """ + return self._tag + + @tag.setter + def tag(self, tag): + """Sets the tag of this AnnotatedTag. + + + :param tag: The tag of this AnnotatedTag. # noqa: E501 + :type: str + """ + + self._tag = tag + + @property + def tagger(self): + """Gets the tagger of this AnnotatedTag. # noqa: E501 + + + :return: The tagger of this AnnotatedTag. # noqa: E501 + :rtype: CommitUser + """ + return self._tagger + + @tagger.setter + def tagger(self, tagger): + """Sets the tagger of this AnnotatedTag. + + + :param tagger: The tagger of this AnnotatedTag. # noqa: E501 + :type: CommitUser + """ + + self._tagger = tagger + + @property + def url(self): + """Gets the url of this AnnotatedTag. # noqa: E501 + + + :return: The url of this AnnotatedTag. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this AnnotatedTag. + + + :param url: The url of this AnnotatedTag. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def verification(self): + """Gets the verification of this AnnotatedTag. # noqa: E501 + + + :return: The verification of this AnnotatedTag. # noqa: E501 + :rtype: PayloadCommitVerification + """ + return self._verification + + @verification.setter + def verification(self, verification): + """Sets the verification of this AnnotatedTag. + + + :param verification: The verification of this AnnotatedTag. # noqa: E501 + :type: PayloadCommitVerification + """ + + self._verification = verification + + 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(AnnotatedTag, 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, AnnotatedTag): + 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/giteapython/models/annotated_tag_object.py b/giteapython/models/annotated_tag_object.py new file mode 100644 index 0000000..714b254 --- /dev/null +++ b/giteapython/models/annotated_tag_object.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 AnnotatedTagObject(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 = { + 'sha': 'str', + 'type': 'str', + 'url': 'str' + } + + attribute_map = { + 'sha': 'sha', + 'type': 'type', + 'url': 'url' + } + + def __init__(self, sha=None, type=None, url=None): # noqa: E501 + """AnnotatedTagObject - a model defined in Swagger""" # noqa: E501 + + self._sha = None + self._type = None + self._url = None + self.discriminator = None + + if sha is not None: + self.sha = sha + if type is not None: + self.type = type + if url is not None: + self.url = url + + @property + def sha(self): + """Gets the sha of this AnnotatedTagObject. # noqa: E501 + + + :return: The sha of this AnnotatedTagObject. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this AnnotatedTagObject. + + + :param sha: The sha of this AnnotatedTagObject. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def type(self): + """Gets the type of this AnnotatedTagObject. # noqa: E501 + + + :return: The type of this AnnotatedTagObject. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this AnnotatedTagObject. + + + :param type: The type of this AnnotatedTagObject. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def url(self): + """Gets the url of this AnnotatedTagObject. # noqa: E501 + + + :return: The url of this AnnotatedTagObject. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this AnnotatedTagObject. + + + :param url: The url of this AnnotatedTagObject. # 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(AnnotatedTagObject, 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, AnnotatedTagObject): + 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/giteapython/models/api_error.py b/giteapython/models/api_error.py new file mode 100644 index 0000000..d328f52 --- /dev/null +++ b/giteapython/models/api_error.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 APIError(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 = { + 'message': 'str', + 'url': 'str' + } + + attribute_map = { + 'message': 'message', + 'url': 'url' + } + + def __init__(self, message=None, url=None): # noqa: E501 + """APIError - a model defined in Swagger""" # noqa: E501 + + self._message = None + self._url = None + self.discriminator = None + + if message is not None: + self.message = message + if url is not None: + self.url = url + + @property + def message(self): + """Gets the message of this APIError. # noqa: E501 + + + :return: The message of this APIError. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this APIError. + + + :param message: The message of this APIError. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def url(self): + """Gets the url of this APIError. # noqa: E501 + + + :return: The url of this APIError. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this APIError. + + + :param url: The url of this APIError. # 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(APIError, 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, APIError): + 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/giteapython/models/attachment.py b/giteapython/models/attachment.py new file mode 100644 index 0000000..23493a5 --- /dev/null +++ b/giteapython/models/attachment.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 Attachment(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 = { + 'browser_download_url': 'str', + 'created_at': 'datetime', + 'download_count': 'int', + 'id': 'int', + 'name': 'str', + 'size': 'int', + 'uuid': 'str' + } + + attribute_map = { + 'browser_download_url': 'browser_download_url', + 'created_at': 'created_at', + 'download_count': 'download_count', + 'id': 'id', + 'name': 'name', + 'size': 'size', + 'uuid': 'uuid' + } + + def __init__(self, browser_download_url=None, created_at=None, download_count=None, id=None, name=None, size=None, uuid=None): # noqa: E501 + """Attachment - a model defined in Swagger""" # noqa: E501 + + self._browser_download_url = None + self._created_at = None + self._download_count = None + self._id = None + self._name = None + self._size = None + self._uuid = None + self.discriminator = None + + if browser_download_url is not None: + self.browser_download_url = browser_download_url + if created_at is not None: + self.created_at = created_at + if download_count is not None: + self.download_count = download_count + if id is not None: + self.id = id + if name is not None: + self.name = name + if size is not None: + self.size = size + if uuid is not None: + self.uuid = uuid + + @property + def browser_download_url(self): + """Gets the browser_download_url of this Attachment. # noqa: E501 + + + :return: The browser_download_url of this Attachment. # noqa: E501 + :rtype: str + """ + return self._browser_download_url + + @browser_download_url.setter + def browser_download_url(self, browser_download_url): + """Sets the browser_download_url of this Attachment. + + + :param browser_download_url: The browser_download_url of this Attachment. # noqa: E501 + :type: str + """ + + self._browser_download_url = browser_download_url + + @property + def created_at(self): + """Gets the created_at of this Attachment. # noqa: E501 + + + :return: The created_at of this Attachment. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Attachment. + + + :param created_at: The created_at of this Attachment. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def download_count(self): + """Gets the download_count of this Attachment. # noqa: E501 + + + :return: The download_count of this Attachment. # noqa: E501 + :rtype: int + """ + return self._download_count + + @download_count.setter + def download_count(self, download_count): + """Sets the download_count of this Attachment. + + + :param download_count: The download_count of this Attachment. # noqa: E501 + :type: int + """ + + self._download_count = download_count + + @property + def id(self): + """Gets the id of this Attachment. # noqa: E501 + + + :return: The id of this Attachment. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Attachment. + + + :param id: The id of this Attachment. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this Attachment. # noqa: E501 + + + :return: The name of this Attachment. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Attachment. + + + :param name: The name of this Attachment. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def size(self): + """Gets the size of this Attachment. # noqa: E501 + + + :return: The size of this Attachment. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this Attachment. + + + :param size: The size of this Attachment. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def uuid(self): + """Gets the uuid of this Attachment. # noqa: E501 + + + :return: The uuid of this Attachment. # noqa: E501 + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid): + """Sets the uuid of this Attachment. + + + :param uuid: The uuid of this Attachment. # noqa: E501 + :type: str + """ + + self._uuid = uuid + + 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(Attachment, 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, Attachment): + 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/giteapython/models/branch.py b/giteapython/models/branch.py new file mode 100644 index 0000000..d3aa65f --- /dev/null +++ b/giteapython/models/branch.py @@ -0,0 +1,323 @@ +# 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 Branch(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 = { + 'commit': 'PayloadCommit', + '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', + '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, 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): + """Gets the commit of this Branch. # noqa: E501 + + + :return: The commit of this Branch. # noqa: E501 + :rtype: PayloadCommit + """ + return self._commit + + @commit.setter + def commit(self, commit): + """Sets the commit of this Branch. + + + :param commit: The commit of this Branch. # noqa: E501 + :type: PayloadCommit + """ + + 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 + + + :return: The name of this Branch. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Branch. + + + :param name: The name of this Branch. # noqa: E501 + :type: str + """ + + 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 = {} + + 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(Branch, 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, Branch): + 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/giteapython/models/branch_protection.py b/giteapython/models/branch_protection.py new file mode 100644 index 0000000..ea6c2d1 --- /dev/null +++ b/giteapython/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/giteapython/models/comment.py b/giteapython/models/comment.py new file mode 100644 index 0000000..aafa1e2 --- /dev/null +++ b/giteapython/models/comment.py @@ -0,0 +1,349 @@ +# 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 Comment(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', + 'created_at': 'datetime', + 'html_url': 'str', + 'id': 'int', + 'issue_url': 'str', + 'original_author': 'str', + 'original_author_id': 'int', + 'pull_request_url': 'str', + 'updated_at': 'datetime', + 'user': 'User' + } + + attribute_map = { + 'body': 'body', + 'created_at': 'created_at', + 'html_url': 'html_url', + 'id': 'id', + 'issue_url': 'issue_url', + 'original_author': 'original_author', + 'original_author_id': 'original_author_id', + 'pull_request_url': 'pull_request_url', + 'updated_at': 'updated_at', + 'user': 'user' + } + + def __init__(self, body=None, created_at=None, html_url=None, id=None, issue_url=None, original_author=None, original_author_id=None, pull_request_url=None, updated_at=None, user=None): # noqa: E501 + """Comment - a model defined in Swagger""" # noqa: E501 + + self._body = None + self._created_at = None + self._html_url = None + self._id = None + self._issue_url = None + self._original_author = None + self._original_author_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 created_at is not None: + self.created_at = created_at + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if issue_url is not None: + self.issue_url = issue_url + if original_author is not None: + self.original_author = original_author + if original_author_id is not None: + self.original_author_id = original_author_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 Comment. # noqa: E501 + + + :return: The body of this Comment. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this Comment. + + + :param body: The body of this Comment. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def created_at(self): + """Gets the created_at of this Comment. # noqa: E501 + + + :return: The created_at of this Comment. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Comment. + + + :param created_at: The created_at of this Comment. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def html_url(self): + """Gets the html_url of this Comment. # noqa: E501 + + + :return: The html_url of this Comment. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this Comment. + + + :param html_url: The html_url of this Comment. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this Comment. # noqa: E501 + + + :return: The id of this Comment. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Comment. + + + :param id: The id of this Comment. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def issue_url(self): + """Gets the issue_url of this Comment. # noqa: E501 + + + :return: The issue_url of this Comment. # noqa: E501 + :rtype: str + """ + return self._issue_url + + @issue_url.setter + def issue_url(self, issue_url): + """Sets the issue_url of this Comment. + + + :param issue_url: The issue_url of this Comment. # noqa: E501 + :type: str + """ + + self._issue_url = issue_url + + @property + def original_author(self): + """Gets the original_author of this Comment. # noqa: E501 + + + :return: The original_author of this Comment. # noqa: E501 + :rtype: str + """ + return self._original_author + + @original_author.setter + def original_author(self, original_author): + """Sets the original_author of this Comment. + + + :param original_author: The original_author of this Comment. # noqa: E501 + :type: str + """ + + self._original_author = original_author + + @property + def original_author_id(self): + """Gets the original_author_id of this Comment. # noqa: E501 + + + :return: The original_author_id of this Comment. # noqa: E501 + :rtype: int + """ + return self._original_author_id + + @original_author_id.setter + def original_author_id(self, original_author_id): + """Sets the original_author_id of this Comment. + + + :param original_author_id: The original_author_id of this Comment. # noqa: E501 + :type: int + """ + + self._original_author_id = original_author_id + + @property + def pull_request_url(self): + """Gets the pull_request_url of this Comment. # noqa: E501 + + + :return: The pull_request_url of this Comment. # 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 Comment. + + + :param pull_request_url: The pull_request_url of this Comment. # noqa: E501 + :type: str + """ + + self._pull_request_url = pull_request_url + + @property + def updated_at(self): + """Gets the updated_at of this Comment. # noqa: E501 + + + :return: The updated_at of this Comment. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this Comment. + + + :param updated_at: The updated_at of this Comment. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def user(self): + """Gets the user of this Comment. # noqa: E501 + + + :return: The user of this Comment. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this Comment. + + + :param user: The user of this Comment. # 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(Comment, 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, Comment): + 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/giteapython/models/commit.py b/giteapython/models/commit.py new file mode 100644 index 0000000..d892f11 --- /dev/null +++ b/giteapython/models/commit.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 Commit(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': 'User', + 'commit': 'RepoCommit', + 'committer': 'User', + 'html_url': 'str', + 'parents': 'list[CommitMeta]', + 'sha': 'str', + 'url': 'str' + } + + attribute_map = { + 'author': 'author', + 'commit': 'commit', + 'committer': 'committer', + 'html_url': 'html_url', + 'parents': 'parents', + 'sha': 'sha', + 'url': 'url' + } + + def __init__(self, author=None, commit=None, committer=None, html_url=None, parents=None, sha=None, url=None): # noqa: E501 + """Commit - a model defined in Swagger""" # noqa: E501 + + self._author = None + self._commit = None + self._committer = None + self._html_url = None + self._parents = None + self._sha = None + self._url = None + self.discriminator = None + + if author is not None: + self.author = author + if commit is not None: + self.commit = commit + if committer is not None: + self.committer = committer + if html_url is not None: + self.html_url = html_url + if parents is not None: + self.parents = parents + if sha is not None: + self.sha = sha + if url is not None: + self.url = url + + @property + def author(self): + """Gets the author of this Commit. # noqa: E501 + + + :return: The author of this Commit. # noqa: E501 + :rtype: User + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this Commit. + + + :param author: The author of this Commit. # noqa: E501 + :type: User + """ + + self._author = author + + @property + def commit(self): + """Gets the commit of this Commit. # noqa: E501 + + + :return: The commit of this Commit. # noqa: E501 + :rtype: RepoCommit + """ + return self._commit + + @commit.setter + def commit(self, commit): + """Sets the commit of this Commit. + + + :param commit: The commit of this Commit. # noqa: E501 + :type: RepoCommit + """ + + self._commit = commit + + @property + def committer(self): + """Gets the committer of this Commit. # noqa: E501 + + + :return: The committer of this Commit. # noqa: E501 + :rtype: User + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this Commit. + + + :param committer: The committer of this Commit. # noqa: E501 + :type: User + """ + + self._committer = committer + + @property + def html_url(self): + """Gets the html_url of this Commit. # noqa: E501 + + + :return: The html_url of this Commit. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this Commit. + + + :param html_url: The html_url of this Commit. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def parents(self): + """Gets the parents of this Commit. # noqa: E501 + + + :return: The parents of this Commit. # noqa: E501 + :rtype: list[CommitMeta] + """ + return self._parents + + @parents.setter + def parents(self, parents): + """Sets the parents of this Commit. + + + :param parents: The parents of this Commit. # noqa: E501 + :type: list[CommitMeta] + """ + + self._parents = parents + + @property + def sha(self): + """Gets the sha of this Commit. # noqa: E501 + + + :return: The sha of this Commit. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this Commit. + + + :param sha: The sha of this Commit. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def url(self): + """Gets the url of this Commit. # noqa: E501 + + + :return: The url of this Commit. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Commit. + + + :param url: The url of this Commit. # 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(Commit, 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, Commit): + 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/giteapython/models/commit_date_options.py b/giteapython/models/commit_date_options.py new file mode 100644 index 0000000..e160687 --- /dev/null +++ b/giteapython/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/giteapython/models/commit_meta.py b/giteapython/models/commit_meta.py new file mode 100644 index 0000000..3cf0a0b --- /dev/null +++ b/giteapython/models/commit_meta.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 CommitMeta(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 = { + 'sha': 'str', + 'url': 'str' + } + + attribute_map = { + 'sha': 'sha', + 'url': 'url' + } + + def __init__(self, sha=None, url=None): # noqa: E501 + """CommitMeta - a model defined in Swagger""" # noqa: E501 + + self._sha = None + self._url = None + self.discriminator = None + + if sha is not None: + self.sha = sha + if url is not None: + self.url = url + + @property + def sha(self): + """Gets the sha of this CommitMeta. # noqa: E501 + + + :return: The sha of this CommitMeta. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this CommitMeta. + + + :param sha: The sha of this CommitMeta. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def url(self): + """Gets the url of this CommitMeta. # noqa: E501 + + + :return: The url of this CommitMeta. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this CommitMeta. + + + :param url: The url of this CommitMeta. # 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(CommitMeta, 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, CommitMeta): + 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/giteapython/models/commit_user.py b/giteapython/models/commit_user.py new file mode 100644 index 0000000..b688578 --- /dev/null +++ b/giteapython/models/commit_user.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 CommitUser(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 = { + '_date': 'str', + 'email': 'str', + 'name': 'str' + } + + attribute_map = { + '_date': 'date', + 'email': 'email', + 'name': 'name' + } + + def __init__(self, _date=None, email=None, name=None): # noqa: E501 + """CommitUser - a model defined in Swagger""" # noqa: E501 + + self.__date = None + self._email = None + self._name = None + self.discriminator = None + + if _date is not None: + self._date = _date + if email is not None: + self.email = email + if name is not None: + self.name = name + + @property + def _date(self): + """Gets the _date of this CommitUser. # noqa: E501 + + + :return: The _date of this CommitUser. # noqa: E501 + :rtype: str + """ + return self.__date + + @_date.setter + def _date(self, _date): + """Sets the _date of this CommitUser. + + + :param _date: The _date of this CommitUser. # noqa: E501 + :type: str + """ + + self.__date = _date + + @property + def email(self): + """Gets the email of this CommitUser. # noqa: E501 + + + :return: The email of this CommitUser. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this CommitUser. + + + :param email: The email of this CommitUser. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def name(self): + """Gets the name of this CommitUser. # noqa: E501 + + + :return: The name of this CommitUser. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CommitUser. + + + :param name: The name of this CommitUser. # noqa: E501 + :type: str + """ + + self._name = name + + 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(CommitUser, 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, CommitUser): + 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/giteapython/models/contents_response.py b/giteapython/models/contents_response.py new file mode 100644 index 0000000..45b884e --- /dev/null +++ b/giteapython/models/contents_response.py @@ -0,0 +1,463 @@ +# 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 ContentsResponse(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 = { + 'links': 'FileLinksResponse', + 'content': 'str', + 'download_url': 'str', + 'encoding': 'str', + 'git_url': 'str', + 'html_url': 'str', + 'name': 'str', + 'path': 'str', + 'sha': 'str', + 'size': 'int', + 'submodule_git_url': 'str', + 'target': 'str', + 'type': 'str', + 'url': 'str' + } + + attribute_map = { + 'links': '_links', + 'content': 'content', + 'download_url': 'download_url', + 'encoding': 'encoding', + 'git_url': 'git_url', + 'html_url': 'html_url', + 'name': 'name', + 'path': 'path', + 'sha': 'sha', + 'size': 'size', + 'submodule_git_url': 'submodule_git_url', + 'target': 'target', + 'type': 'type', + 'url': 'url' + } + + def __init__(self, links=None, content=None, download_url=None, encoding=None, git_url=None, html_url=None, name=None, path=None, sha=None, size=None, submodule_git_url=None, target=None, type=None, url=None): # noqa: E501 + """ContentsResponse - a model defined in Swagger""" # noqa: E501 + + self._links = None + self._content = None + self._download_url = None + self._encoding = None + self._git_url = None + self._html_url = None + self._name = None + self._path = None + self._sha = None + self._size = None + self._submodule_git_url = None + self._target = None + self._type = None + self._url = None + self.discriminator = None + + if links is not None: + self.links = links + if content is not None: + self.content = content + if download_url is not None: + self.download_url = download_url + if encoding is not None: + self.encoding = encoding + if git_url is not None: + self.git_url = git_url + if html_url is not None: + self.html_url = html_url + if name is not None: + self.name = name + if path is not None: + self.path = path + if sha is not None: + self.sha = sha + if size is not None: + self.size = size + if submodule_git_url is not None: + self.submodule_git_url = submodule_git_url + if target is not None: + self.target = target + if type is not None: + self.type = type + if url is not None: + self.url = url + + @property + def links(self): + """Gets the links of this ContentsResponse. # noqa: E501 + + + :return: The links of this ContentsResponse. # noqa: E501 + :rtype: FileLinksResponse + """ + return self._links + + @links.setter + def links(self, links): + """Sets the links of this ContentsResponse. + + + :param links: The links of this ContentsResponse. # noqa: E501 + :type: FileLinksResponse + """ + + self._links = links + + @property + def content(self): + """Gets the content of this ContentsResponse. # noqa: E501 + + `content` is populated when `type` is `file`, otherwise null # noqa: E501 + + :return: The content of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this ContentsResponse. + + `content` is populated when `type` is `file`, otherwise null # noqa: E501 + + :param content: The content of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._content = content + + @property + def download_url(self): + """Gets the download_url of this ContentsResponse. # noqa: E501 + + + :return: The download_url of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._download_url + + @download_url.setter + def download_url(self, download_url): + """Sets the download_url of this ContentsResponse. + + + :param download_url: The download_url of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._download_url = download_url + + @property + def encoding(self): + """Gets the encoding of this ContentsResponse. # noqa: E501 + + `encoding` is populated when `type` is `file`, otherwise null # noqa: E501 + + :return: The encoding of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._encoding + + @encoding.setter + def encoding(self, encoding): + """Sets the encoding of this ContentsResponse. + + `encoding` is populated when `type` is `file`, otherwise null # noqa: E501 + + :param encoding: The encoding of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._encoding = encoding + + @property + def git_url(self): + """Gets the git_url of this ContentsResponse. # noqa: E501 + + + :return: The git_url of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._git_url + + @git_url.setter + def git_url(self, git_url): + """Sets the git_url of this ContentsResponse. + + + :param git_url: The git_url of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._git_url = git_url + + @property + def html_url(self): + """Gets the html_url of this ContentsResponse. # noqa: E501 + + + :return: The html_url of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this ContentsResponse. + + + :param html_url: The html_url of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def name(self): + """Gets the name of this ContentsResponse. # noqa: E501 + + + :return: The name of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ContentsResponse. + + + :param name: The name of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def path(self): + """Gets the path of this ContentsResponse. # noqa: E501 + + + :return: The path of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._path + + @path.setter + def path(self, path): + """Sets the path of this ContentsResponse. + + + :param path: The path of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._path = path + + @property + def sha(self): + """Gets the sha of this ContentsResponse. # noqa: E501 + + + :return: The sha of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this ContentsResponse. + + + :param sha: The sha of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def size(self): + """Gets the size of this ContentsResponse. # noqa: E501 + + + :return: The size of this ContentsResponse. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this ContentsResponse. + + + :param size: The size of this ContentsResponse. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def submodule_git_url(self): + """Gets the submodule_git_url of this ContentsResponse. # noqa: E501 + + `submodule_git_url` is populated when `type` is `submodule`, otherwise null # noqa: E501 + + :return: The submodule_git_url of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._submodule_git_url + + @submodule_git_url.setter + def submodule_git_url(self, submodule_git_url): + """Sets the submodule_git_url of this ContentsResponse. + + `submodule_git_url` is populated when `type` is `submodule`, otherwise null # noqa: E501 + + :param submodule_git_url: The submodule_git_url of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._submodule_git_url = submodule_git_url + + @property + def target(self): + """Gets the target of this ContentsResponse. # noqa: E501 + + `target` is populated when `type` is `symlink`, otherwise null # noqa: E501 + + :return: The target of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._target + + @target.setter + def target(self, target): + """Sets the target of this ContentsResponse. + + `target` is populated when `type` is `symlink`, otherwise null # noqa: E501 + + :param target: The target of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._target = target + + @property + def type(self): + """Gets the type of this ContentsResponse. # noqa: E501 + + `type` will be `file`, `dir`, `symlink`, or `submodule` # noqa: E501 + + :return: The type of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this ContentsResponse. + + `type` will be `file`, `dir`, `symlink`, or `submodule` # noqa: E501 + + :param type: The type of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def url(self): + """Gets the url of this ContentsResponse. # noqa: E501 + + + :return: The url of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this ContentsResponse. + + + :param url: The url of this ContentsResponse. # 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(ContentsResponse, 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, ContentsResponse): + 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/giteapython/models/create_branch_protection_option.py b/giteapython/models/create_branch_protection_option.py new file mode 100644 index 0000000..385c69a --- /dev/null +++ b/giteapython/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/giteapython/models/create_email_option.py b/giteapython/models/create_email_option.py new file mode 100644 index 0000000..3693156 --- /dev/null +++ b/giteapython/models/create_email_option.py @@ -0,0 +1,117 @@ +# 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 CreateEmailOption(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 = { + 'emails': 'list[str]' + } + + attribute_map = { + 'emails': 'emails' + } + + def __init__(self, emails=None): # noqa: E501 + """CreateEmailOption - a model defined in Swagger""" # noqa: E501 + + self._emails = None + self.discriminator = None + + if emails is not None: + self.emails = emails + + @property + def emails(self): + """Gets the emails of this CreateEmailOption. # noqa: E501 + + email addresses to add # noqa: E501 + + :return: The emails of this CreateEmailOption. # noqa: E501 + :rtype: list[str] + """ + return self._emails + + @emails.setter + def emails(self, emails): + """Sets the emails of this CreateEmailOption. + + email addresses to add # noqa: E501 + + :param emails: The emails of this CreateEmailOption. # noqa: E501 + :type: list[str] + """ + + self._emails = emails + + 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(CreateEmailOption, 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, CreateEmailOption): + 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/giteapython/models/create_file_options.py b/giteapython/models/create_file_options.py new file mode 100644 index 0000000..f6da5f7 --- /dev/null +++ b/giteapython/models/create_file_options.py @@ -0,0 +1,280 @@ +# 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 CreateFileOptions(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': 'Identity', + 'branch': 'str', + 'committer': 'Identity', + 'content': 'str', + 'dates': 'CommitDateOptions', + 'message': 'str', + 'new_branch': 'str' + } + + attribute_map = { + 'author': 'author', + '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, 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 + + if author is not None: + self.author = author + if branch is not None: + self.branch = branch + 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: + self.new_branch = new_branch + + @property + def author(self): + """Gets the author of this CreateFileOptions. # noqa: E501 + + + :return: The author of this CreateFileOptions. # noqa: E501 + :rtype: Identity + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this CreateFileOptions. + + + :param author: The author of this CreateFileOptions. # noqa: E501 + :type: Identity + """ + + self._author = author + + @property + def branch(self): + """Gets the branch of this CreateFileOptions. # noqa: E501 + + branch (optional) to base this file from. if not given, the default branch is used # noqa: E501 + + :return: The branch of this CreateFileOptions. # noqa: E501 + :rtype: str + """ + return self._branch + + @branch.setter + def branch(self, branch): + """Sets the branch of this CreateFileOptions. + + branch (optional) to base this file from. if not given, the default branch is used # noqa: E501 + + :param branch: The branch of this CreateFileOptions. # noqa: E501 + :type: str + """ + + self._branch = branch + + @property + def committer(self): + """Gets the committer of this CreateFileOptions. # noqa: E501 + + + :return: The committer of this CreateFileOptions. # noqa: E501 + :rtype: Identity + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this CreateFileOptions. + + + :param committer: The committer of this CreateFileOptions. # noqa: E501 + :type: Identity + """ + + self._committer = committer + + @property + def content(self): + """Gets the content of this CreateFileOptions. # noqa: E501 + + content must be base64 encoded # noqa: E501 + + :return: The content of this CreateFileOptions. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this CreateFileOptions. + + content must be base64 encoded # noqa: E501 + + :param content: The content of this CreateFileOptions. # noqa: E501 + :type: str + """ + if content is None: + raise ValueError("Invalid value for `content`, must not be `None`") # noqa: E501 + + 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 + + message (optional) for the commit of this file. if not supplied, a default message will be used # noqa: E501 + + :return: The message of this CreateFileOptions. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this CreateFileOptions. + + message (optional) for the commit of this file. if not supplied, a default message will be used # noqa: E501 + + :param message: The message of this CreateFileOptions. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def new_branch(self): + """Gets the new_branch of this CreateFileOptions. # noqa: E501 + + new_branch (optional) will make a new branch from `branch` before creating the file # noqa: E501 + + :return: The new_branch of this CreateFileOptions. # noqa: E501 + :rtype: str + """ + return self._new_branch + + @new_branch.setter + def new_branch(self, new_branch): + """Sets the new_branch of this CreateFileOptions. + + new_branch (optional) will make a new branch from `branch` before creating the file # noqa: E501 + + :param new_branch: The new_branch of this CreateFileOptions. # noqa: E501 + :type: str + """ + + self._new_branch = new_branch + + 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(CreateFileOptions, 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, CreateFileOptions): + 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/giteapython/models/create_fork_option.py b/giteapython/models/create_fork_option.py new file mode 100644 index 0000000..252921c --- /dev/null +++ b/giteapython/models/create_fork_option.py @@ -0,0 +1,117 @@ +# 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 CreateForkOption(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 = { + 'organization': 'str' + } + + attribute_map = { + 'organization': 'organization' + } + + def __init__(self, organization=None): # noqa: E501 + """CreateForkOption - a model defined in Swagger""" # noqa: E501 + + self._organization = None + self.discriminator = None + + if organization is not None: + self.organization = organization + + @property + def organization(self): + """Gets the organization of this CreateForkOption. # noqa: E501 + + organization name, if forking into an organization # noqa: E501 + + :return: The organization of this CreateForkOption. # noqa: E501 + :rtype: str + """ + return self._organization + + @organization.setter + def organization(self, organization): + """Sets the organization of this CreateForkOption. + + organization name, if forking into an organization # noqa: E501 + + :param organization: The organization of this CreateForkOption. # noqa: E501 + :type: str + """ + + self._organization = organization + + 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(CreateForkOption, 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, CreateForkOption): + 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/giteapython/models/create_gpg_key_option.py b/giteapython/models/create_gpg_key_option.py new file mode 100644 index 0000000..a8094e2 --- /dev/null +++ b/giteapython/models/create_gpg_key_option.py @@ -0,0 +1,118 @@ +# 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 CreateGPGKeyOption(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 = { + 'armored_public_key': 'str' + } + + attribute_map = { + 'armored_public_key': 'armored_public_key' + } + + def __init__(self, armored_public_key=None): # noqa: E501 + """CreateGPGKeyOption - a model defined in Swagger""" # noqa: E501 + + self._armored_public_key = None + self.discriminator = None + + self.armored_public_key = armored_public_key + + @property + def armored_public_key(self): + """Gets the armored_public_key of this CreateGPGKeyOption. # noqa: E501 + + An armored GPG key to add # noqa: E501 + + :return: The armored_public_key of this CreateGPGKeyOption. # noqa: E501 + :rtype: str + """ + return self._armored_public_key + + @armored_public_key.setter + def armored_public_key(self, armored_public_key): + """Sets the armored_public_key of this CreateGPGKeyOption. + + An armored GPG key to add # noqa: E501 + + :param armored_public_key: The armored_public_key of this CreateGPGKeyOption. # noqa: E501 + :type: str + """ + if armored_public_key is None: + raise ValueError("Invalid value for `armored_public_key`, must not be `None`") # noqa: E501 + + self._armored_public_key = armored_public_key + + 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(CreateGPGKeyOption, 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, CreateGPGKeyOption): + 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/giteapython/models/create_hook_option.py b/giteapython/models/create_hook_option.py new file mode 100644 index 0000000..d7fd29a --- /dev/null +++ b/giteapython/models/create_hook_option.py @@ -0,0 +1,227 @@ +# 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 CreateHookOption(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 = { + 'active': 'bool', + 'branch_filter': 'str', + 'config': 'CreateHookOptionConfig', + 'events': 'list[str]', + 'type': 'str' + } + + attribute_map = { + 'active': 'active', + 'branch_filter': 'branch_filter', + 'config': 'config', + 'events': 'events', + 'type': 'type' + } + + def __init__(self, active=False, branch_filter=None, config=None, events=None, type=None): # noqa: E501 + """CreateHookOption - a model defined in Swagger""" # noqa: E501 + + self._active = None + self._branch_filter = None + self._config = None + self._events = None + self._type = None + self.discriminator = None + + if active is not None: + self.active = active + if branch_filter is not None: + self.branch_filter = branch_filter + self.config = config + if events is not None: + self.events = events + self.type = type + + @property + def active(self): + """Gets the active of this CreateHookOption. # noqa: E501 + + + :return: The active of this CreateHookOption. # noqa: E501 + :rtype: bool + """ + return self._active + + @active.setter + def active(self, active): + """Sets the active of this CreateHookOption. + + + :param active: The active of this CreateHookOption. # noqa: E501 + :type: bool + """ + + self._active = active + + @property + def branch_filter(self): + """Gets the branch_filter of this CreateHookOption. # noqa: E501 + + + :return: The branch_filter of this CreateHookOption. # noqa: E501 + :rtype: str + """ + return self._branch_filter + + @branch_filter.setter + def branch_filter(self, branch_filter): + """Sets the branch_filter of this CreateHookOption. + + + :param branch_filter: The branch_filter of this CreateHookOption. # noqa: E501 + :type: str + """ + + self._branch_filter = branch_filter + + @property + def config(self): + """Gets the config of this CreateHookOption. # noqa: E501 + + + :return: The config of this CreateHookOption. # noqa: E501 + :rtype: CreateHookOptionConfig + """ + return self._config + + @config.setter + def config(self, config): + """Sets the config of this CreateHookOption. + + + :param config: The config of this CreateHookOption. # noqa: E501 + :type: CreateHookOptionConfig + """ + if config is None: + raise ValueError("Invalid value for `config`, must not be `None`") # noqa: E501 + + self._config = config + + @property + def events(self): + """Gets the events of this CreateHookOption. # noqa: E501 + + + :return: The events of this CreateHookOption. # noqa: E501 + :rtype: list[str] + """ + return self._events + + @events.setter + def events(self, events): + """Sets the events of this CreateHookOption. + + + :param events: The events of this CreateHookOption. # noqa: E501 + :type: list[str] + """ + + self._events = events + + @property + def type(self): + """Gets the type of this CreateHookOption. # noqa: E501 + + + :return: The type of this CreateHookOption. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this CreateHookOption. + + + :param type: The type of this CreateHookOption. # noqa: E501 + :type: str + """ + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # 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 + .format(type, allowed_values) + ) + + self._type = type + + 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(CreateHookOption, 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, CreateHookOption): + 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/giteapython/models/create_hook_option_config.py b/giteapython/models/create_hook_option_config.py new file mode 100644 index 0000000..a701520 --- /dev/null +++ b/giteapython/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/giteapython/models/create_issue_comment_option.py b/giteapython/models/create_issue_comment_option.py new file mode 100644 index 0000000..8377c3b --- /dev/null +++ b/giteapython/models/create_issue_comment_option.py @@ -0,0 +1,116 @@ +# 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 CreateIssueCommentOption(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' + } + + attribute_map = { + 'body': 'body' + } + + def __init__(self, body=None): # noqa: E501 + """CreateIssueCommentOption - a model defined in Swagger""" # noqa: E501 + + self._body = None + self.discriminator = None + + self.body = body + + @property + def body(self): + """Gets the body of this CreateIssueCommentOption. # noqa: E501 + + + :return: The body of this CreateIssueCommentOption. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreateIssueCommentOption. + + + :param body: The body of this CreateIssueCommentOption. # noqa: E501 + :type: str + """ + if body is None: + raise ValueError("Invalid value for `body`, must not be `None`") # noqa: E501 + + self._body = body + + 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(CreateIssueCommentOption, 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, CreateIssueCommentOption): + 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/giteapython/models/create_issue_option.py b/giteapython/models/create_issue_option.py new file mode 100644 index 0000000..147d13e --- /dev/null +++ b/giteapython/models/create_issue_option.py @@ -0,0 +1,304 @@ +# 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 CreateIssueOption(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 = { + 'assignee': 'str', + 'assignees': 'list[str]', + 'body': 'str', + 'closed': 'bool', + 'due_date': 'datetime', + 'labels': 'list[int]', + 'milestone': 'int', + 'title': 'str' + } + + attribute_map = { + 'assignee': 'assignee', + 'assignees': 'assignees', + 'body': 'body', + 'closed': 'closed', + 'due_date': 'due_date', + 'labels': 'labels', + 'milestone': 'milestone', + 'title': 'title' + } + + def __init__(self, assignee=None, assignees=None, body=None, closed=None, due_date=None, labels=None, milestone=None, title=None): # noqa: E501 + """CreateIssueOption - a model defined in Swagger""" # noqa: E501 + + self._assignee = None + self._assignees = None + self._body = None + self._closed = None + self._due_date = None + self._labels = None + self._milestone = None + self._title = None + self.discriminator = None + + if assignee is not None: + self.assignee = assignee + if assignees is not None: + self.assignees = assignees + if body is not None: + self.body = body + if closed is not None: + self.closed = closed + if due_date is not None: + self.due_date = due_date + if labels is not None: + self.labels = labels + if milestone is not None: + self.milestone = milestone + self.title = title + + @property + def assignee(self): + """Gets the assignee of this CreateIssueOption. # noqa: E501 + + username of assignee # noqa: E501 + + :return: The assignee of this CreateIssueOption. # noqa: E501 + :rtype: str + """ + return self._assignee + + @assignee.setter + def assignee(self, assignee): + """Sets the assignee of this CreateIssueOption. + + username of assignee # noqa: E501 + + :param assignee: The assignee of this CreateIssueOption. # noqa: E501 + :type: str + """ + + self._assignee = assignee + + @property + def assignees(self): + """Gets the assignees of this CreateIssueOption. # noqa: E501 + + + :return: The assignees of this CreateIssueOption. # noqa: E501 + :rtype: list[str] + """ + return self._assignees + + @assignees.setter + def assignees(self, assignees): + """Sets the assignees of this CreateIssueOption. + + + :param assignees: The assignees of this CreateIssueOption. # noqa: E501 + :type: list[str] + """ + + self._assignees = assignees + + @property + def body(self): + """Gets the body of this CreateIssueOption. # noqa: E501 + + + :return: The body of this CreateIssueOption. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreateIssueOption. + + + :param body: The body of this CreateIssueOption. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def closed(self): + """Gets the closed of this CreateIssueOption. # noqa: E501 + + + :return: The closed of this CreateIssueOption. # noqa: E501 + :rtype: bool + """ + return self._closed + + @closed.setter + def closed(self, closed): + """Sets the closed of this CreateIssueOption. + + + :param closed: The closed of this CreateIssueOption. # noqa: E501 + :type: bool + """ + + self._closed = closed + + @property + def due_date(self): + """Gets the due_date of this CreateIssueOption. # noqa: E501 + + + :return: The due_date of this CreateIssueOption. # noqa: E501 + :rtype: datetime + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this CreateIssueOption. + + + :param due_date: The due_date of this CreateIssueOption. # noqa: E501 + :type: datetime + """ + + self._due_date = due_date + + @property + def labels(self): + """Gets the labels of this CreateIssueOption. # noqa: E501 + + list of label ids # noqa: E501 + + :return: The labels of this CreateIssueOption. # noqa: E501 + :rtype: list[int] + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this CreateIssueOption. + + list of label ids # noqa: E501 + + :param labels: The labels of this CreateIssueOption. # noqa: E501 + :type: list[int] + """ + + self._labels = labels + + @property + def milestone(self): + """Gets the milestone of this CreateIssueOption. # noqa: E501 + + milestone id # noqa: E501 + + :return: The milestone of this CreateIssueOption. # noqa: E501 + :rtype: int + """ + return self._milestone + + @milestone.setter + def milestone(self, milestone): + """Sets the milestone of this CreateIssueOption. + + milestone id # noqa: E501 + + :param milestone: The milestone of this CreateIssueOption. # noqa: E501 + :type: int + """ + + self._milestone = milestone + + @property + def title(self): + """Gets the title of this CreateIssueOption. # noqa: E501 + + + :return: The title of this CreateIssueOption. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this CreateIssueOption. + + + :param title: The title of this CreateIssueOption. # noqa: E501 + :type: str + """ + if title is None: + raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 + + self._title = title + + 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(CreateIssueOption, 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, CreateIssueOption): + 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/giteapython/models/create_key_option.py b/giteapython/models/create_key_option.py new file mode 100644 index 0000000..5d1d9a5 --- /dev/null +++ b/giteapython/models/create_key_option.py @@ -0,0 +1,175 @@ +# 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 CreateKeyOption(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 = { + 'key': 'str', + 'read_only': 'bool', + 'title': 'str' + } + + attribute_map = { + 'key': 'key', + 'read_only': 'read_only', + 'title': 'title' + } + + def __init__(self, key=None, read_only=None, title=None): # noqa: E501 + """CreateKeyOption - a model defined in Swagger""" # noqa: E501 + + self._key = None + self._read_only = None + self._title = None + self.discriminator = None + + self.key = key + if read_only is not None: + self.read_only = read_only + self.title = title + + @property + def key(self): + """Gets the key of this CreateKeyOption. # noqa: E501 + + An armored SSH key to add # noqa: E501 + + :return: The key of this CreateKeyOption. # noqa: E501 + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this CreateKeyOption. + + An armored SSH key to add # noqa: E501 + + :param key: The key of this CreateKeyOption. # noqa: E501 + :type: str + """ + if key is None: + raise ValueError("Invalid value for `key`, must not be `None`") # noqa: E501 + + self._key = key + + @property + def read_only(self): + """Gets the read_only of this CreateKeyOption. # noqa: E501 + + Describe if the key has only read access or read/write # noqa: E501 + + :return: The read_only of this CreateKeyOption. # noqa: E501 + :rtype: bool + """ + return self._read_only + + @read_only.setter + def read_only(self, read_only): + """Sets the read_only of this CreateKeyOption. + + Describe if the key has only read access or read/write # noqa: E501 + + :param read_only: The read_only of this CreateKeyOption. # noqa: E501 + :type: bool + """ + + self._read_only = read_only + + @property + def title(self): + """Gets the title of this CreateKeyOption. # noqa: E501 + + Title of the key to add # noqa: E501 + + :return: The title of this CreateKeyOption. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this CreateKeyOption. + + Title of the key to add # noqa: E501 + + :param title: The title of this CreateKeyOption. # noqa: E501 + :type: str + """ + if title is None: + raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 + + self._title = title + + 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(CreateKeyOption, 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, CreateKeyOption): + 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/giteapython/models/create_label_option.py b/giteapython/models/create_label_option.py new file mode 100644 index 0000000..9c04687 --- /dev/null +++ b/giteapython/models/create_label_option.py @@ -0,0 +1,169 @@ +# 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 CreateLabelOption(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 = { + 'color': 'str', + 'description': 'str', + 'name': 'str' + } + + attribute_map = { + 'color': 'color', + 'description': 'description', + 'name': 'name' + } + + def __init__(self, color=None, description=None, name=None): # noqa: E501 + """CreateLabelOption - a model defined in Swagger""" # noqa: E501 + + self._color = None + self._description = None + self._name = None + self.discriminator = None + + self.color = color + if description is not None: + self.description = description + self.name = name + + @property + def color(self): + """Gets the color of this CreateLabelOption. # noqa: E501 + + + :return: The color of this CreateLabelOption. # noqa: E501 + :rtype: str + """ + return self._color + + @color.setter + def color(self, color): + """Sets the color of this CreateLabelOption. + + + :param color: The color of this CreateLabelOption. # noqa: E501 + :type: str + """ + if color is None: + raise ValueError("Invalid value for `color`, must not be `None`") # noqa: E501 + + self._color = color + + @property + def description(self): + """Gets the description of this CreateLabelOption. # noqa: E501 + + + :return: The description of this CreateLabelOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateLabelOption. + + + :param description: The description of this CreateLabelOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def name(self): + """Gets the name of this CreateLabelOption. # noqa: E501 + + + :return: The name of this CreateLabelOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateLabelOption. + + + :param name: The name of this CreateLabelOption. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + 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(CreateLabelOption, 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, CreateLabelOption): + 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/giteapython/models/create_milestone_option.py b/giteapython/models/create_milestone_option.py new file mode 100644 index 0000000..3f3d34c --- /dev/null +++ b/giteapython/models/create_milestone_option.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 CreateMilestoneOption(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 = { + 'description': 'str', + 'due_on': 'datetime', + 'title': 'str' + } + + attribute_map = { + 'description': 'description', + 'due_on': 'due_on', + 'title': 'title' + } + + def __init__(self, description=None, due_on=None, title=None): # noqa: E501 + """CreateMilestoneOption - a model defined in Swagger""" # noqa: E501 + + self._description = None + self._due_on = None + self._title = None + self.discriminator = None + + if description is not None: + self.description = description + if due_on is not None: + self.due_on = due_on + if title is not None: + self.title = title + + @property + def description(self): + """Gets the description of this CreateMilestoneOption. # noqa: E501 + + + :return: The description of this CreateMilestoneOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateMilestoneOption. + + + :param description: The description of this CreateMilestoneOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def due_on(self): + """Gets the due_on of this CreateMilestoneOption. # noqa: E501 + + + :return: The due_on of this CreateMilestoneOption. # noqa: E501 + :rtype: datetime + """ + return self._due_on + + @due_on.setter + def due_on(self, due_on): + """Sets the due_on of this CreateMilestoneOption. + + + :param due_on: The due_on of this CreateMilestoneOption. # noqa: E501 + :type: datetime + """ + + self._due_on = due_on + + @property + def title(self): + """Gets the title of this CreateMilestoneOption. # noqa: E501 + + + :return: The title of this CreateMilestoneOption. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this CreateMilestoneOption. + + + :param title: The title of this CreateMilestoneOption. # noqa: E501 + :type: str + """ + + self._title = title + + 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(CreateMilestoneOption, 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, CreateMilestoneOption): + 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/giteapython/models/create_o_auth2_application_options.py b/giteapython/models/create_o_auth2_application_options.py new file mode 100644 index 0000000..0483a52 --- /dev/null +++ b/giteapython/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/giteapython/models/create_org_option.py b/giteapython/models/create_org_option.py new file mode 100644 index 0000000..c2241e5 --- /dev/null +++ b/giteapython/models/create_org_option.py @@ -0,0 +1,280 @@ +# 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 CreateOrgOption(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 = { + 'description': 'str', + 'full_name': 'str', + 'location': 'str', + 'repo_admin_change_team_access': 'bool', + 'username': 'str', + 'visibility': 'str', + 'website': 'str' + } + + attribute_map = { + 'description': 'description', + 'full_name': 'full_name', + 'location': 'location', + 'repo_admin_change_team_access': 'repo_admin_change_team_access', + 'username': 'username', + 'visibility': 'visibility', + 'website': 'website' + } + + def __init__(self, description=None, full_name=None, location=None, repo_admin_change_team_access=None, username=None, visibility=None, website=None): # noqa: E501 + """CreateOrgOption - a model defined in Swagger""" # noqa: E501 + + self._description = None + self._full_name = None + self._location = None + self._repo_admin_change_team_access = None + self._username = None + self._visibility = None + self._website = None + self.discriminator = None + + if description is not None: + self.description = description + if full_name is not None: + self.full_name = full_name + if location is not None: + self.location = location + if repo_admin_change_team_access is not None: + self.repo_admin_change_team_access = repo_admin_change_team_access + self.username = username + if visibility is not None: + self.visibility = visibility + if website is not None: + self.website = website + + @property + def description(self): + """Gets the description of this CreateOrgOption. # noqa: E501 + + + :return: The description of this CreateOrgOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateOrgOption. + + + :param description: The description of this CreateOrgOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def full_name(self): + """Gets the full_name of this CreateOrgOption. # noqa: E501 + + + :return: The full_name of this CreateOrgOption. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this CreateOrgOption. + + + :param full_name: The full_name of this CreateOrgOption. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def location(self): + """Gets the location of this CreateOrgOption. # noqa: E501 + + + :return: The location of this CreateOrgOption. # noqa: E501 + :rtype: str + """ + return self._location + + @location.setter + def location(self, location): + """Sets the location of this CreateOrgOption. + + + :param location: The location of this CreateOrgOption. # noqa: E501 + :type: str + """ + + self._location = location + + @property + def repo_admin_change_team_access(self): + """Gets the repo_admin_change_team_access of this CreateOrgOption. # noqa: E501 + + + :return: The repo_admin_change_team_access of this CreateOrgOption. # noqa: E501 + :rtype: bool + """ + return self._repo_admin_change_team_access + + @repo_admin_change_team_access.setter + def repo_admin_change_team_access(self, repo_admin_change_team_access): + """Sets the repo_admin_change_team_access of this CreateOrgOption. + + + :param repo_admin_change_team_access: The repo_admin_change_team_access of this CreateOrgOption. # noqa: E501 + :type: bool + """ + + self._repo_admin_change_team_access = repo_admin_change_team_access + + @property + def username(self): + """Gets the username of this CreateOrgOption. # noqa: E501 + + + :return: The username of this CreateOrgOption. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this CreateOrgOption. + + + :param username: The username of this CreateOrgOption. # noqa: E501 + :type: str + """ + if username is None: + raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 + + self._username = username + + @property + def visibility(self): + """Gets the visibility of this CreateOrgOption. # noqa: E501 + + possible values are `public` (default), `limited` or `private` # noqa: E501 + + :return: The visibility of this CreateOrgOption. # noqa: E501 + :rtype: str + """ + return self._visibility + + @visibility.setter + def visibility(self, visibility): + """Sets the visibility of this CreateOrgOption. + + possible values are `public` (default), `limited` or `private` # noqa: E501 + + :param visibility: The visibility of this CreateOrgOption. # noqa: E501 + :type: str + """ + allowed_values = ["public", "limited", "private"] # noqa: E501 + if visibility not in allowed_values: + raise ValueError( + "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 + .format(visibility, allowed_values) + ) + + self._visibility = visibility + + @property + def website(self): + """Gets the website of this CreateOrgOption. # noqa: E501 + + + :return: The website of this CreateOrgOption. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this CreateOrgOption. + + + :param website: The website of this CreateOrgOption. # noqa: E501 + :type: str + """ + + self._website = website + + 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(CreateOrgOption, 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, CreateOrgOption): + 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/giteapython/models/create_pull_request_option.py b/giteapython/models/create_pull_request_option.py new file mode 100644 index 0000000..e682c89 --- /dev/null +++ b/giteapython/models/create_pull_request_option.py @@ -0,0 +1,323 @@ +# 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 CreatePullRequestOption(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 = { + 'assignee': 'str', + 'assignees': 'list[str]', + 'base': 'str', + 'body': 'str', + 'due_date': 'datetime', + 'head': 'str', + 'labels': 'list[int]', + 'milestone': 'int', + 'title': 'str' + } + + attribute_map = { + 'assignee': 'assignee', + 'assignees': 'assignees', + 'base': 'base', + 'body': 'body', + 'due_date': 'due_date', + 'head': 'head', + 'labels': 'labels', + 'milestone': 'milestone', + 'title': 'title' + } + + def __init__(self, assignee=None, assignees=None, base=None, body=None, due_date=None, head=None, labels=None, milestone=None, title=None): # noqa: E501 + """CreatePullRequestOption - a model defined in Swagger""" # noqa: E501 + + self._assignee = None + self._assignees = None + self._base = None + self._body = None + self._due_date = None + self._head = None + self._labels = None + self._milestone = None + self._title = None + self.discriminator = None + + if assignee is not None: + self.assignee = assignee + if assignees is not None: + self.assignees = assignees + if base is not None: + self.base = base + if body is not None: + self.body = body + if due_date is not None: + self.due_date = due_date + if head is not None: + self.head = head + if labels is not None: + self.labels = labels + if milestone is not None: + self.milestone = milestone + if title is not None: + self.title = title + + @property + def assignee(self): + """Gets the assignee of this CreatePullRequestOption. # noqa: E501 + + + :return: The assignee of this CreatePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._assignee + + @assignee.setter + def assignee(self, assignee): + """Sets the assignee of this CreatePullRequestOption. + + + :param assignee: The assignee of this CreatePullRequestOption. # noqa: E501 + :type: str + """ + + self._assignee = assignee + + @property + def assignees(self): + """Gets the assignees of this CreatePullRequestOption. # noqa: E501 + + + :return: The assignees of this CreatePullRequestOption. # noqa: E501 + :rtype: list[str] + """ + return self._assignees + + @assignees.setter + def assignees(self, assignees): + """Sets the assignees of this CreatePullRequestOption. + + + :param assignees: The assignees of this CreatePullRequestOption. # noqa: E501 + :type: list[str] + """ + + self._assignees = assignees + + @property + def base(self): + """Gets the base of this CreatePullRequestOption. # noqa: E501 + + + :return: The base of this CreatePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._base + + @base.setter + def base(self, base): + """Sets the base of this CreatePullRequestOption. + + + :param base: The base of this CreatePullRequestOption. # noqa: E501 + :type: str + """ + + self._base = base + + @property + def body(self): + """Gets the body of this CreatePullRequestOption. # noqa: E501 + + + :return: The body of this CreatePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreatePullRequestOption. + + + :param body: The body of this CreatePullRequestOption. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def due_date(self): + """Gets the due_date of this CreatePullRequestOption. # noqa: E501 + + + :return: The due_date of this CreatePullRequestOption. # noqa: E501 + :rtype: datetime + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this CreatePullRequestOption. + + + :param due_date: The due_date of this CreatePullRequestOption. # noqa: E501 + :type: datetime + """ + + self._due_date = due_date + + @property + def head(self): + """Gets the head of this CreatePullRequestOption. # noqa: E501 + + + :return: The head of this CreatePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._head + + @head.setter + def head(self, head): + """Sets the head of this CreatePullRequestOption. + + + :param head: The head of this CreatePullRequestOption. # noqa: E501 + :type: str + """ + + self._head = head + + @property + def labels(self): + """Gets the labels of this CreatePullRequestOption. # noqa: E501 + + + :return: The labels of this CreatePullRequestOption. # noqa: E501 + :rtype: list[int] + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this CreatePullRequestOption. + + + :param labels: The labels of this CreatePullRequestOption. # noqa: E501 + :type: list[int] + """ + + self._labels = labels + + @property + def milestone(self): + """Gets the milestone of this CreatePullRequestOption. # noqa: E501 + + + :return: The milestone of this CreatePullRequestOption. # noqa: E501 + :rtype: int + """ + return self._milestone + + @milestone.setter + def milestone(self, milestone): + """Sets the milestone of this CreatePullRequestOption. + + + :param milestone: The milestone of this CreatePullRequestOption. # noqa: E501 + :type: int + """ + + self._milestone = milestone + + @property + def title(self): + """Gets the title of this CreatePullRequestOption. # noqa: E501 + + + :return: The title of this CreatePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this CreatePullRequestOption. + + + :param title: The title of this CreatePullRequestOption. # noqa: E501 + :type: str + """ + + self._title = title + + 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(CreatePullRequestOption, 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, CreatePullRequestOption): + 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/giteapython/models/create_pull_review_comment.py b/giteapython/models/create_pull_review_comment.py new file mode 100644 index 0000000..46d1d9a --- /dev/null +++ b/giteapython/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/giteapython/models/create_pull_review_options.py b/giteapython/models/create_pull_review_options.py new file mode 100644 index 0000000..1b53be2 --- /dev/null +++ b/giteapython/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/giteapython/models/create_release_option.py b/giteapython/models/create_release_option.py new file mode 100644 index 0000000..dbae5fd --- /dev/null +++ b/giteapython/models/create_release_option.py @@ -0,0 +1,246 @@ +# 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 CreateReleaseOption(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', + 'draft': 'bool', + 'name': 'str', + 'prerelease': 'bool', + 'tag_name': 'str', + 'target_commitish': 'str' + } + + attribute_map = { + 'body': 'body', + 'draft': 'draft', + 'name': 'name', + 'prerelease': 'prerelease', + 'tag_name': 'tag_name', + 'target_commitish': 'target_commitish' + } + + def __init__(self, body=None, draft=None, name=None, prerelease=None, tag_name=None, target_commitish=None): # noqa: E501 + """CreateReleaseOption - a model defined in Swagger""" # noqa: E501 + + self._body = None + self._draft = None + self._name = None + self._prerelease = None + self._tag_name = None + self._target_commitish = None + self.discriminator = None + + if body is not None: + self.body = body + if draft is not None: + self.draft = draft + if name is not None: + self.name = name + if prerelease is not None: + self.prerelease = prerelease + self.tag_name = tag_name + if target_commitish is not None: + self.target_commitish = target_commitish + + @property + def body(self): + """Gets the body of this CreateReleaseOption. # noqa: E501 + + + :return: The body of this CreateReleaseOption. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreateReleaseOption. + + + :param body: The body of this CreateReleaseOption. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def draft(self): + """Gets the draft of this CreateReleaseOption. # noqa: E501 + + + :return: The draft of this CreateReleaseOption. # noqa: E501 + :rtype: bool + """ + return self._draft + + @draft.setter + def draft(self, draft): + """Sets the draft of this CreateReleaseOption. + + + :param draft: The draft of this CreateReleaseOption. # noqa: E501 + :type: bool + """ + + self._draft = draft + + @property + def name(self): + """Gets the name of this CreateReleaseOption. # noqa: E501 + + + :return: The name of this CreateReleaseOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateReleaseOption. + + + :param name: The name of this CreateReleaseOption. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def prerelease(self): + """Gets the prerelease of this CreateReleaseOption. # noqa: E501 + + + :return: The prerelease of this CreateReleaseOption. # noqa: E501 + :rtype: bool + """ + return self._prerelease + + @prerelease.setter + def prerelease(self, prerelease): + """Sets the prerelease of this CreateReleaseOption. + + + :param prerelease: The prerelease of this CreateReleaseOption. # noqa: E501 + :type: bool + """ + + self._prerelease = prerelease + + @property + def tag_name(self): + """Gets the tag_name of this CreateReleaseOption. # noqa: E501 + + + :return: The tag_name of this CreateReleaseOption. # noqa: E501 + :rtype: str + """ + return self._tag_name + + @tag_name.setter + def tag_name(self, tag_name): + """Sets the tag_name of this CreateReleaseOption. + + + :param tag_name: The tag_name of this CreateReleaseOption. # noqa: E501 + :type: str + """ + if tag_name is None: + raise ValueError("Invalid value for `tag_name`, must not be `None`") # noqa: E501 + + self._tag_name = tag_name + + @property + def target_commitish(self): + """Gets the target_commitish of this CreateReleaseOption. # noqa: E501 + + + :return: The target_commitish of this CreateReleaseOption. # noqa: E501 + :rtype: str + """ + return self._target_commitish + + @target_commitish.setter + def target_commitish(self, target_commitish): + """Sets the target_commitish of this CreateReleaseOption. + + + :param target_commitish: The target_commitish of this CreateReleaseOption. # noqa: E501 + :type: str + """ + + self._target_commitish = target_commitish + + 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(CreateReleaseOption, 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, CreateReleaseOption): + 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/giteapython/models/create_repo_option.py b/giteapython/models/create_repo_option.py new file mode 100644 index 0000000..69dcdee --- /dev/null +++ b/giteapython/models/create_repo_option.py @@ -0,0 +1,342 @@ +# 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 CreateRepoOption(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 = { + 'auto_init': 'bool', + 'default_branch': 'str', + 'description': 'str', + 'gitignores': 'str', + 'issue_labels': 'str', + 'license': 'str', + 'name': 'str', + 'private': 'bool', + 'readme': 'str' + } + + attribute_map = { + 'auto_init': 'auto_init', + 'default_branch': 'default_branch', + 'description': 'description', + 'gitignores': 'gitignores', + 'issue_labels': 'issue_labels', + 'license': 'license', + 'name': 'name', + 'private': 'private', + 'readme': 'readme' + } + + 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 + self._license = None + self._name = None + self._private = None + self._readme = None + self.discriminator = None + + 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: + self.gitignores = gitignores + if issue_labels is not None: + self.issue_labels = issue_labels + if license is not None: + self.license = license + self.name = name + if private is not None: + self.private = private + if readme is not None: + self.readme = readme + + @property + def auto_init(self): + """Gets the auto_init of this CreateRepoOption. # noqa: E501 + + Whether the repository should be auto-intialized? # noqa: E501 + + :return: The auto_init of this CreateRepoOption. # noqa: E501 + :rtype: bool + """ + return self._auto_init + + @auto_init.setter + def auto_init(self, auto_init): + """Sets the auto_init of this CreateRepoOption. + + Whether the repository should be auto-intialized? # noqa: E501 + + :param auto_init: The auto_init of this CreateRepoOption. # noqa: E501 + :type: bool + """ + + 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 + + Description of the repository to create # noqa: E501 + + :return: The description of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateRepoOption. + + Description of the repository to create # noqa: E501 + + :param description: The description of this CreateRepoOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def gitignores(self): + """Gets the gitignores of this CreateRepoOption. # noqa: E501 + + Gitignores to use # noqa: E501 + + :return: The gitignores of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._gitignores + + @gitignores.setter + def gitignores(self, gitignores): + """Sets the gitignores of this CreateRepoOption. + + Gitignores to use # noqa: E501 + + :param gitignores: The gitignores of this CreateRepoOption. # noqa: E501 + :type: str + """ + + self._gitignores = gitignores + + @property + def issue_labels(self): + """Gets the issue_labels of this CreateRepoOption. # noqa: E501 + + Issue Label set to use # noqa: E501 + + :return: The issue_labels of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._issue_labels + + @issue_labels.setter + def issue_labels(self, issue_labels): + """Sets the issue_labels of this CreateRepoOption. + + Issue Label set to use # noqa: E501 + + :param issue_labels: The issue_labels of this CreateRepoOption. # noqa: E501 + :type: str + """ + + self._issue_labels = issue_labels + + @property + def license(self): + """Gets the license of this CreateRepoOption. # noqa: E501 + + License to use # noqa: E501 + + :return: The license of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._license + + @license.setter + def license(self, license): + """Sets the license of this CreateRepoOption. + + License to use # noqa: E501 + + :param license: The license of this CreateRepoOption. # noqa: E501 + :type: str + """ + + self._license = license + + @property + def name(self): + """Gets the name of this CreateRepoOption. # noqa: E501 + + Name of the repository to create # noqa: E501 + + :return: The name of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateRepoOption. + + Name of the repository to create # noqa: E501 + + :param name: The name of this CreateRepoOption. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def private(self): + """Gets the private of this CreateRepoOption. # noqa: E501 + + Whether the repository is private # noqa: E501 + + :return: The private of this CreateRepoOption. # noqa: E501 + :rtype: bool + """ + return self._private + + @private.setter + def private(self, private): + """Sets the private of this CreateRepoOption. + + Whether the repository is private # noqa: E501 + + :param private: The private of this CreateRepoOption. # noqa: E501 + :type: bool + """ + + self._private = private + + @property + def readme(self): + """Gets the readme of this CreateRepoOption. # noqa: E501 + + Readme of the repository to create # noqa: E501 + + :return: The readme of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._readme + + @readme.setter + def readme(self, readme): + """Sets the readme of this CreateRepoOption. + + Readme of the repository to create # noqa: E501 + + :param readme: The readme of this CreateRepoOption. # noqa: E501 + :type: str + """ + + self._readme = readme + + 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(CreateRepoOption, 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, CreateRepoOption): + 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/giteapython/models/create_status_option.py b/giteapython/models/create_status_option.py new file mode 100644 index 0000000..7ca43d4 --- /dev/null +++ b/giteapython/models/create_status_option.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 CreateStatusOption(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 = { + 'context': 'str', + 'description': 'str', + 'state': 'StatusState', + 'target_url': 'str' + } + + attribute_map = { + 'context': 'context', + 'description': 'description', + 'state': 'state', + 'target_url': 'target_url' + } + + def __init__(self, context=None, description=None, state=None, target_url=None): # noqa: E501 + """CreateStatusOption - a model defined in Swagger""" # noqa: E501 + + self._context = None + self._description = None + self._state = None + self._target_url = None + self.discriminator = None + + if context is not None: + self.context = context + if description is not None: + self.description = description + if state is not None: + self.state = state + if target_url is not None: + self.target_url = target_url + + @property + def context(self): + """Gets the context of this CreateStatusOption. # noqa: E501 + + + :return: The context of this CreateStatusOption. # noqa: E501 + :rtype: str + """ + return self._context + + @context.setter + def context(self, context): + """Sets the context of this CreateStatusOption. + + + :param context: The context of this CreateStatusOption. # noqa: E501 + :type: str + """ + + self._context = context + + @property + def description(self): + """Gets the description of this CreateStatusOption. # noqa: E501 + + + :return: The description of this CreateStatusOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateStatusOption. + + + :param description: The description of this CreateStatusOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def state(self): + """Gets the state of this CreateStatusOption. # noqa: E501 + + + :return: The state of this CreateStatusOption. # noqa: E501 + :rtype: StatusState + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this CreateStatusOption. + + + :param state: The state of this CreateStatusOption. # noqa: E501 + :type: StatusState + """ + + self._state = state + + @property + def target_url(self): + """Gets the target_url of this CreateStatusOption. # noqa: E501 + + + :return: The target_url of this CreateStatusOption. # noqa: E501 + :rtype: str + """ + return self._target_url + + @target_url.setter + def target_url(self, target_url): + """Sets the target_url of this CreateStatusOption. + + + :param target_url: The target_url of this CreateStatusOption. # noqa: E501 + :type: str + """ + + self._target_url = target_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(CreateStatusOption, 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, CreateStatusOption): + 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/giteapython/models/create_team_option.py b/giteapython/models/create_team_option.py new file mode 100644 index 0000000..71eb8a2 --- /dev/null +++ b/giteapython/models/create_team_option.py @@ -0,0 +1,252 @@ +# 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 CreateTeamOption(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 = { + '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, 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 + + + :return: The description of this CreateTeamOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateTeamOption. + + + :param description: The description of this CreateTeamOption. # noqa: E501 + :type: str + """ + + 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 + + + :return: The name of this CreateTeamOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateTeamOption. + + + :param name: The name of this CreateTeamOption. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def permission(self): + """Gets the permission of this CreateTeamOption. # noqa: E501 + + + :return: The permission of this CreateTeamOption. # noqa: E501 + :rtype: str + """ + return self._permission + + @permission.setter + def permission(self, permission): + """Sets the permission of this CreateTeamOption. + + + :param permission: The permission of this CreateTeamOption. # noqa: E501 + :type: str + """ + allowed_values = ["read", "write", "admin"] # noqa: E501 + if permission not in allowed_values: + raise ValueError( + "Invalid value for `permission` ({0}), must be one of {1}" # noqa: E501 + .format(permission, allowed_values) + ) + + self._permission = permission + + @property + def units(self): + """Gets the units of this CreateTeamOption. # noqa: E501 + + + :return: The units of this CreateTeamOption. # noqa: E501 + :rtype: list[str] + """ + return self._units + + @units.setter + def units(self, units): + """Sets the units of this CreateTeamOption. + + + :param units: The units of this CreateTeamOption. # noqa: E501 + :type: list[str] + """ + + self._units = units + + 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(CreateTeamOption, 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, CreateTeamOption): + 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/giteapython/models/create_user_option.py b/giteapython/models/create_user_option.py new file mode 100644 index 0000000..3e091dd --- /dev/null +++ b/giteapython/models/create_user_option.py @@ -0,0 +1,300 @@ +# 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 CreateUserOption(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 = { + 'email': 'str', + 'full_name': 'str', + 'login_name': 'str', + 'must_change_password': 'bool', + 'password': 'str', + 'send_notify': 'bool', + 'source_id': 'int', + 'username': 'str' + } + + attribute_map = { + 'email': 'email', + 'full_name': 'full_name', + 'login_name': 'login_name', + 'must_change_password': 'must_change_password', + 'password': 'password', + 'send_notify': 'send_notify', + 'source_id': 'source_id', + 'username': 'username' + } + + def __init__(self, email=None, full_name=None, login_name=None, must_change_password=None, password=None, send_notify=None, source_id=None, username=None): # noqa: E501 + """CreateUserOption - a model defined in Swagger""" # noqa: E501 + + self._email = None + self._full_name = None + self._login_name = None + self._must_change_password = None + self._password = None + self._send_notify = None + self._source_id = None + self._username = None + self.discriminator = None + + self.email = email + if full_name is not None: + self.full_name = full_name + if login_name is not None: + self.login_name = login_name + if must_change_password is not None: + self.must_change_password = must_change_password + self.password = password + if send_notify is not None: + self.send_notify = send_notify + if source_id is not None: + self.source_id = source_id + self.username = username + + @property + def email(self): + """Gets the email of this CreateUserOption. # noqa: E501 + + + :return: The email of this CreateUserOption. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this CreateUserOption. + + + :param email: The email of this CreateUserOption. # noqa: E501 + :type: str + """ + if email is None: + raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501 + + self._email = email + + @property + def full_name(self): + """Gets the full_name of this CreateUserOption. # noqa: E501 + + + :return: The full_name of this CreateUserOption. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this CreateUserOption. + + + :param full_name: The full_name of this CreateUserOption. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def login_name(self): + """Gets the login_name of this CreateUserOption. # noqa: E501 + + + :return: The login_name of this CreateUserOption. # noqa: E501 + :rtype: str + """ + return self._login_name + + @login_name.setter + def login_name(self, login_name): + """Sets the login_name of this CreateUserOption. + + + :param login_name: The login_name of this CreateUserOption. # noqa: E501 + :type: str + """ + + self._login_name = login_name + + @property + def must_change_password(self): + """Gets the must_change_password of this CreateUserOption. # noqa: E501 + + + :return: The must_change_password of this CreateUserOption. # noqa: E501 + :rtype: bool + """ + return self._must_change_password + + @must_change_password.setter + def must_change_password(self, must_change_password): + """Sets the must_change_password of this CreateUserOption. + + + :param must_change_password: The must_change_password of this CreateUserOption. # noqa: E501 + :type: bool + """ + + self._must_change_password = must_change_password + + @property + def password(self): + """Gets the password of this CreateUserOption. # noqa: E501 + + + :return: The password of this CreateUserOption. # noqa: E501 + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this CreateUserOption. + + + :param password: The password of this CreateUserOption. # noqa: E501 + :type: str + """ + if password is None: + raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 + + self._password = password + + @property + def send_notify(self): + """Gets the send_notify of this CreateUserOption. # noqa: E501 + + + :return: The send_notify of this CreateUserOption. # noqa: E501 + :rtype: bool + """ + return self._send_notify + + @send_notify.setter + def send_notify(self, send_notify): + """Sets the send_notify of this CreateUserOption. + + + :param send_notify: The send_notify of this CreateUserOption. # noqa: E501 + :type: bool + """ + + self._send_notify = send_notify + + @property + def source_id(self): + """Gets the source_id of this CreateUserOption. # noqa: E501 + + + :return: The source_id of this CreateUserOption. # noqa: E501 + :rtype: int + """ + return self._source_id + + @source_id.setter + def source_id(self, source_id): + """Sets the source_id of this CreateUserOption. + + + :param source_id: The source_id of this CreateUserOption. # noqa: E501 + :type: int + """ + + self._source_id = source_id + + @property + def username(self): + """Gets the username of this CreateUserOption. # noqa: E501 + + + :return: The username of this CreateUserOption. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this CreateUserOption. + + + :param username: The username of this CreateUserOption. # noqa: E501 + :type: str + """ + if username is None: + raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 + + self._username = username + + 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(CreateUserOption, 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, CreateUserOption): + 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/giteapython/models/delete_email_option.py b/giteapython/models/delete_email_option.py new file mode 100644 index 0000000..ab1cb1c --- /dev/null +++ b/giteapython/models/delete_email_option.py @@ -0,0 +1,117 @@ +# 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 DeleteEmailOption(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 = { + 'emails': 'list[str]' + } + + attribute_map = { + 'emails': 'emails' + } + + def __init__(self, emails=None): # noqa: E501 + """DeleteEmailOption - a model defined in Swagger""" # noqa: E501 + + self._emails = None + self.discriminator = None + + if emails is not None: + self.emails = emails + + @property + def emails(self): + """Gets the emails of this DeleteEmailOption. # noqa: E501 + + email addresses to delete # noqa: E501 + + :return: The emails of this DeleteEmailOption. # noqa: E501 + :rtype: list[str] + """ + return self._emails + + @emails.setter + def emails(self, emails): + """Sets the emails of this DeleteEmailOption. + + email addresses to delete # noqa: E501 + + :param emails: The emails of this DeleteEmailOption. # noqa: E501 + :type: list[str] + """ + + self._emails = emails + + 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(DeleteEmailOption, 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, DeleteEmailOption): + 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/giteapython/models/delete_file_options.py b/giteapython/models/delete_file_options.py new file mode 100644 index 0000000..e3ebd6e --- /dev/null +++ b/giteapython/models/delete_file_options.py @@ -0,0 +1,280 @@ +# 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 DeleteFileOptions(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': 'Identity', + 'branch': 'str', + 'committer': 'Identity', + 'dates': 'CommitDateOptions', + 'message': 'str', + 'new_branch': 'str', + 'sha': 'str' + } + + attribute_map = { + '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, 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 + self.discriminator = None + + if author is not None: + self.author = author + if branch is not None: + 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: + self.new_branch = new_branch + self.sha = sha + + @property + def author(self): + """Gets the author of this DeleteFileOptions. # noqa: E501 + + + :return: The author of this DeleteFileOptions. # noqa: E501 + :rtype: Identity + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this DeleteFileOptions. + + + :param author: The author of this DeleteFileOptions. # noqa: E501 + :type: Identity + """ + + self._author = author + + @property + def branch(self): + """Gets the branch of this DeleteFileOptions. # noqa: E501 + + branch (optional) to base this file from. if not given, the default branch is used # noqa: E501 + + :return: The branch of this DeleteFileOptions. # noqa: E501 + :rtype: str + """ + return self._branch + + @branch.setter + def branch(self, branch): + """Sets the branch of this DeleteFileOptions. + + branch (optional) to base this file from. if not given, the default branch is used # noqa: E501 + + :param branch: The branch of this DeleteFileOptions. # noqa: E501 + :type: str + """ + + self._branch = branch + + @property + def committer(self): + """Gets the committer of this DeleteFileOptions. # noqa: E501 + + + :return: The committer of this DeleteFileOptions. # noqa: E501 + :rtype: Identity + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this DeleteFileOptions. + + + :param committer: The committer of this DeleteFileOptions. # noqa: E501 + :type: Identity + """ + + 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 + + message (optional) for the commit of this file. if not supplied, a default message will be used # noqa: E501 + + :return: The message of this DeleteFileOptions. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this DeleteFileOptions. + + message (optional) for the commit of this file. if not supplied, a default message will be used # noqa: E501 + + :param message: The message of this DeleteFileOptions. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def new_branch(self): + """Gets the new_branch of this DeleteFileOptions. # noqa: E501 + + new_branch (optional) will make a new branch from `branch` before creating the file # noqa: E501 + + :return: The new_branch of this DeleteFileOptions. # noqa: E501 + :rtype: str + """ + return self._new_branch + + @new_branch.setter + def new_branch(self, new_branch): + """Sets the new_branch of this DeleteFileOptions. + + new_branch (optional) will make a new branch from `branch` before creating the file # noqa: E501 + + :param new_branch: The new_branch of this DeleteFileOptions. # noqa: E501 + :type: str + """ + + self._new_branch = new_branch + + @property + def sha(self): + """Gets the sha of this DeleteFileOptions. # noqa: E501 + + sha is the SHA for the file that already exists # noqa: E501 + + :return: The sha of this DeleteFileOptions. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this DeleteFileOptions. + + sha is the SHA for the file that already exists # noqa: E501 + + :param sha: The sha of this DeleteFileOptions. # noqa: E501 + :type: str + """ + if sha is None: + raise ValueError("Invalid value for `sha`, must not be `None`") # noqa: E501 + + self._sha = sha + + 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(DeleteFileOptions, 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, DeleteFileOptions): + 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/giteapython/models/deploy_key.py b/giteapython/models/deploy_key.py new file mode 100644 index 0000000..0168d12 --- /dev/null +++ b/giteapython/models/deploy_key.py @@ -0,0 +1,323 @@ +# 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 DeployKey(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_at': 'datetime', + 'fingerprint': 'str', + 'id': 'int', + 'key': 'str', + 'key_id': 'int', + 'read_only': 'bool', + 'repository': 'Repository', + 'title': 'str', + 'url': 'str' + } + + attribute_map = { + 'created_at': 'created_at', + 'fingerprint': 'fingerprint', + 'id': 'id', + 'key': 'key', + 'key_id': 'key_id', + 'read_only': 'read_only', + 'repository': 'repository', + 'title': 'title', + 'url': 'url' + } + + def __init__(self, created_at=None, fingerprint=None, id=None, key=None, key_id=None, read_only=None, repository=None, title=None, url=None): # noqa: E501 + """DeployKey - a model defined in Swagger""" # noqa: E501 + + self._created_at = None + self._fingerprint = None + self._id = None + self._key = None + self._key_id = None + self._read_only = None + self._repository = None + self._title = None + self._url = None + self.discriminator = None + + if created_at is not None: + self.created_at = created_at + if fingerprint is not None: + self.fingerprint = fingerprint + if id is not None: + self.id = id + if key is not None: + self.key = key + if key_id is not None: + self.key_id = key_id + if read_only is not None: + self.read_only = read_only + if repository is not None: + self.repository = repository + if title is not None: + self.title = title + if url is not None: + self.url = url + + @property + def created_at(self): + """Gets the created_at of this DeployKey. # noqa: E501 + + + :return: The created_at of this DeployKey. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this DeployKey. + + + :param created_at: The created_at of this DeployKey. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def fingerprint(self): + """Gets the fingerprint of this DeployKey. # noqa: E501 + + + :return: The fingerprint of this DeployKey. # noqa: E501 + :rtype: str + """ + return self._fingerprint + + @fingerprint.setter + def fingerprint(self, fingerprint): + """Sets the fingerprint of this DeployKey. + + + :param fingerprint: The fingerprint of this DeployKey. # noqa: E501 + :type: str + """ + + self._fingerprint = fingerprint + + @property + def id(self): + """Gets the id of this DeployKey. # noqa: E501 + + + :return: The id of this DeployKey. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this DeployKey. + + + :param id: The id of this DeployKey. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def key(self): + """Gets the key of this DeployKey. # noqa: E501 + + + :return: The key of this DeployKey. # noqa: E501 + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this DeployKey. + + + :param key: The key of this DeployKey. # noqa: E501 + :type: str + """ + + self._key = key + + @property + def key_id(self): + """Gets the key_id of this DeployKey. # noqa: E501 + + + :return: The key_id of this DeployKey. # noqa: E501 + :rtype: int + """ + return self._key_id + + @key_id.setter + def key_id(self, key_id): + """Sets the key_id of this DeployKey. + + + :param key_id: The key_id of this DeployKey. # noqa: E501 + :type: int + """ + + self._key_id = key_id + + @property + def read_only(self): + """Gets the read_only of this DeployKey. # noqa: E501 + + + :return: The read_only of this DeployKey. # noqa: E501 + :rtype: bool + """ + return self._read_only + + @read_only.setter + def read_only(self, read_only): + """Sets the read_only of this DeployKey. + + + :param read_only: The read_only of this DeployKey. # noqa: E501 + :type: bool + """ + + self._read_only = read_only + + @property + def repository(self): + """Gets the repository of this DeployKey. # noqa: E501 + + + :return: The repository of this DeployKey. # noqa: E501 + :rtype: Repository + """ + return self._repository + + @repository.setter + def repository(self, repository): + """Sets the repository of this DeployKey. + + + :param repository: The repository of this DeployKey. # noqa: E501 + :type: Repository + """ + + self._repository = repository + + @property + def title(self): + """Gets the title of this DeployKey. # noqa: E501 + + + :return: The title of this DeployKey. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this DeployKey. + + + :param title: The title of this DeployKey. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def url(self): + """Gets the url of this DeployKey. # noqa: E501 + + + :return: The url of this DeployKey. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this DeployKey. + + + :param url: The url of this DeployKey. # 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(DeployKey, 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, DeployKey): + 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/giteapython/models/edit_attachment_options.py b/giteapython/models/edit_attachment_options.py new file mode 100644 index 0000000..8a19c9c --- /dev/null +++ b/giteapython/models/edit_attachment_options.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 EditAttachmentOptions(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' + } + + attribute_map = { + 'name': 'name' + } + + def __init__(self, name=None): # noqa: E501 + """EditAttachmentOptions - a model defined in Swagger""" # noqa: E501 + + self._name = None + self.discriminator = None + + if name is not None: + self.name = name + + @property + def name(self): + """Gets the name of this EditAttachmentOptions. # noqa: E501 + + + :return: The name of this EditAttachmentOptions. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this EditAttachmentOptions. + + + :param name: The name of this EditAttachmentOptions. # noqa: E501 + :type: str + """ + + self._name = name + + 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(EditAttachmentOptions, 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, EditAttachmentOptions): + 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/giteapython/models/edit_branch_protection_option.py b/giteapython/models/edit_branch_protection_option.py new file mode 100644 index 0000000..3f2e0e9 --- /dev/null +++ b/giteapython/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/giteapython/models/edit_deadline_option.py b/giteapython/models/edit_deadline_option.py new file mode 100644 index 0000000..1c4d389 --- /dev/null +++ b/giteapython/models/edit_deadline_option.py @@ -0,0 +1,116 @@ +# 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 EditDeadlineOption(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 = { + 'due_date': 'datetime' + } + + attribute_map = { + 'due_date': 'due_date' + } + + def __init__(self, due_date=None): # noqa: E501 + """EditDeadlineOption - a model defined in Swagger""" # noqa: E501 + + self._due_date = None + self.discriminator = None + + self.due_date = due_date + + @property + def due_date(self): + """Gets the due_date of this EditDeadlineOption. # noqa: E501 + + + :return: The due_date of this EditDeadlineOption. # noqa: E501 + :rtype: datetime + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this EditDeadlineOption. + + + :param due_date: The due_date of this EditDeadlineOption. # noqa: E501 + :type: datetime + """ + if due_date is None: + raise ValueError("Invalid value for `due_date`, must not be `None`") # noqa: E501 + + self._due_date = due_date + + 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(EditDeadlineOption, 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, EditDeadlineOption): + 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/giteapython/models/edit_git_hook_option.py b/giteapython/models/edit_git_hook_option.py new file mode 100644 index 0000000..53b6695 --- /dev/null +++ b/giteapython/models/edit_git_hook_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 EditGitHookOption(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 + """EditGitHookOption - 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 EditGitHookOption. # noqa: E501 + + + :return: The content of this EditGitHookOption. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this EditGitHookOption. + + + :param content: The content of this EditGitHookOption. # 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(EditGitHookOption, 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, EditGitHookOption): + 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/giteapython/models/edit_hook_option.py b/giteapython/models/edit_hook_option.py new file mode 100644 index 0000000..9cffd23 --- /dev/null +++ b/giteapython/models/edit_hook_option.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 EditHookOption(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 = { + 'active': 'bool', + 'branch_filter': 'str', + 'config': 'dict(str, str)', + 'events': 'list[str]' + } + + attribute_map = { + 'active': 'active', + 'branch_filter': 'branch_filter', + 'config': 'config', + 'events': 'events' + } + + def __init__(self, active=None, branch_filter=None, config=None, events=None): # noqa: E501 + """EditHookOption - a model defined in Swagger""" # noqa: E501 + + self._active = None + self._branch_filter = None + self._config = None + self._events = None + self.discriminator = None + + if active is not None: + self.active = active + if branch_filter is not None: + self.branch_filter = branch_filter + if config is not None: + self.config = config + if events is not None: + self.events = events + + @property + def active(self): + """Gets the active of this EditHookOption. # noqa: E501 + + + :return: The active of this EditHookOption. # noqa: E501 + :rtype: bool + """ + return self._active + + @active.setter + def active(self, active): + """Sets the active of this EditHookOption. + + + :param active: The active of this EditHookOption. # noqa: E501 + :type: bool + """ + + self._active = active + + @property + def branch_filter(self): + """Gets the branch_filter of this EditHookOption. # noqa: E501 + + + :return: The branch_filter of this EditHookOption. # noqa: E501 + :rtype: str + """ + return self._branch_filter + + @branch_filter.setter + def branch_filter(self, branch_filter): + """Sets the branch_filter of this EditHookOption. + + + :param branch_filter: The branch_filter of this EditHookOption. # noqa: E501 + :type: str + """ + + self._branch_filter = branch_filter + + @property + def config(self): + """Gets the config of this EditHookOption. # noqa: E501 + + + :return: The config of this EditHookOption. # noqa: E501 + :rtype: dict(str, str) + """ + return self._config + + @config.setter + def config(self, config): + """Sets the config of this EditHookOption. + + + :param config: The config of this EditHookOption. # noqa: E501 + :type: dict(str, str) + """ + + self._config = config + + @property + def events(self): + """Gets the events of this EditHookOption. # noqa: E501 + + + :return: The events of this EditHookOption. # noqa: E501 + :rtype: list[str] + """ + return self._events + + @events.setter + def events(self, events): + """Sets the events of this EditHookOption. + + + :param events: The events of this EditHookOption. # noqa: E501 + :type: list[str] + """ + + self._events = events + + 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(EditHookOption, 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, EditHookOption): + 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/giteapython/models/edit_issue_comment_option.py b/giteapython/models/edit_issue_comment_option.py new file mode 100644 index 0000000..328cd0d --- /dev/null +++ b/giteapython/models/edit_issue_comment_option.py @@ -0,0 +1,116 @@ +# 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 EditIssueCommentOption(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' + } + + attribute_map = { + 'body': 'body' + } + + def __init__(self, body=None): # noqa: E501 + """EditIssueCommentOption - a model defined in Swagger""" # noqa: E501 + + self._body = None + self.discriminator = None + + self.body = body + + @property + def body(self): + """Gets the body of this EditIssueCommentOption. # noqa: E501 + + + :return: The body of this EditIssueCommentOption. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this EditIssueCommentOption. + + + :param body: The body of this EditIssueCommentOption. # noqa: E501 + :type: str + """ + if body is None: + raise ValueError("Invalid value for `body`, must not be `None`") # noqa: E501 + + self._body = body + + 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(EditIssueCommentOption, 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, EditIssueCommentOption): + 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/giteapython/models/edit_issue_option.py b/giteapython/models/edit_issue_option.py new file mode 100644 index 0000000..bf60993 --- /dev/null +++ b/giteapython/models/edit_issue_option.py @@ -0,0 +1,297 @@ +# 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 EditIssueOption(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 = { + 'assignee': 'str', + 'assignees': 'list[str]', + 'body': 'str', + 'due_date': 'datetime', + 'milestone': 'int', + 'state': 'str', + 'title': 'str', + 'unset_due_date': 'bool' + } + + attribute_map = { + 'assignee': 'assignee', + 'assignees': 'assignees', + 'body': 'body', + 'due_date': 'due_date', + 'milestone': 'milestone', + 'state': 'state', + '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, unset_due_date=None): # noqa: E501 + """EditIssueOption - a model defined in Swagger""" # noqa: E501 + + self._assignee = None + self._assignees = None + self._body = None + self._due_date = None + self._milestone = None + self._state = None + self._title = None + self._unset_due_date = None + self.discriminator = None + + if assignee is not None: + self.assignee = assignee + if assignees is not None: + self.assignees = assignees + if body is not None: + self.body = body + if due_date is not None: + self.due_date = due_date + if milestone is not None: + self.milestone = milestone + if state is not None: + 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): + """Gets the assignee of this EditIssueOption. # noqa: E501 + + + :return: The assignee of this EditIssueOption. # noqa: E501 + :rtype: str + """ + return self._assignee + + @assignee.setter + def assignee(self, assignee): + """Sets the assignee of this EditIssueOption. + + + :param assignee: The assignee of this EditIssueOption. # noqa: E501 + :type: str + """ + + self._assignee = assignee + + @property + def assignees(self): + """Gets the assignees of this EditIssueOption. # noqa: E501 + + + :return: The assignees of this EditIssueOption. # noqa: E501 + :rtype: list[str] + """ + return self._assignees + + @assignees.setter + def assignees(self, assignees): + """Sets the assignees of this EditIssueOption. + + + :param assignees: The assignees of this EditIssueOption. # noqa: E501 + :type: list[str] + """ + + self._assignees = assignees + + @property + def body(self): + """Gets the body of this EditIssueOption. # noqa: E501 + + + :return: The body of this EditIssueOption. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this EditIssueOption. + + + :param body: The body of this EditIssueOption. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def due_date(self): + """Gets the due_date of this EditIssueOption. # noqa: E501 + + + :return: The due_date of this EditIssueOption. # noqa: E501 + :rtype: datetime + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this EditIssueOption. + + + :param due_date: The due_date of this EditIssueOption. # noqa: E501 + :type: datetime + """ + + self._due_date = due_date + + @property + def milestone(self): + """Gets the milestone of this EditIssueOption. # noqa: E501 + + + :return: The milestone of this EditIssueOption. # noqa: E501 + :rtype: int + """ + return self._milestone + + @milestone.setter + def milestone(self, milestone): + """Sets the milestone of this EditIssueOption. + + + :param milestone: The milestone of this EditIssueOption. # noqa: E501 + :type: int + """ + + self._milestone = milestone + + @property + def state(self): + """Gets the state of this EditIssueOption. # noqa: E501 + + + :return: The state of this EditIssueOption. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this EditIssueOption. + + + :param state: The state of this EditIssueOption. # noqa: E501 + :type: str + """ + + self._state = state + + @property + def title(self): + """Gets the title of this EditIssueOption. # noqa: E501 + + + :return: The title of this EditIssueOption. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this EditIssueOption. + + + :param title: The title of this EditIssueOption. # noqa: E501 + :type: str + """ + + 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 = {} + + 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(EditIssueOption, 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, EditIssueOption): + 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/giteapython/models/edit_label_option.py b/giteapython/models/edit_label_option.py new file mode 100644 index 0000000..98eb6b8 --- /dev/null +++ b/giteapython/models/edit_label_option.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 EditLabelOption(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 = { + 'color': 'str', + 'description': 'str', + 'name': 'str' + } + + attribute_map = { + 'color': 'color', + 'description': 'description', + 'name': 'name' + } + + def __init__(self, color=None, description=None, name=None): # noqa: E501 + """EditLabelOption - a model defined in Swagger""" # noqa: E501 + + self._color = None + self._description = None + self._name = None + self.discriminator = None + + if color is not None: + self.color = color + if description is not None: + self.description = description + if name is not None: + self.name = name + + @property + def color(self): + """Gets the color of this EditLabelOption. # noqa: E501 + + + :return: The color of this EditLabelOption. # noqa: E501 + :rtype: str + """ + return self._color + + @color.setter + def color(self, color): + """Sets the color of this EditLabelOption. + + + :param color: The color of this EditLabelOption. # noqa: E501 + :type: str + """ + + self._color = color + + @property + def description(self): + """Gets the description of this EditLabelOption. # noqa: E501 + + + :return: The description of this EditLabelOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this EditLabelOption. + + + :param description: The description of this EditLabelOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def name(self): + """Gets the name of this EditLabelOption. # noqa: E501 + + + :return: The name of this EditLabelOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this EditLabelOption. + + + :param name: The name of this EditLabelOption. # noqa: E501 + :type: str + """ + + self._name = name + + 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(EditLabelOption, 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, EditLabelOption): + 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/giteapython/models/edit_milestone_option.py b/giteapython/models/edit_milestone_option.py new file mode 100644 index 0000000..e72dff5 --- /dev/null +++ b/giteapython/models/edit_milestone_option.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 EditMilestoneOption(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 = { + 'description': 'str', + 'due_on': 'datetime', + 'state': 'str', + 'title': 'str' + } + + attribute_map = { + 'description': 'description', + 'due_on': 'due_on', + 'state': 'state', + 'title': 'title' + } + + def __init__(self, description=None, due_on=None, state=None, title=None): # noqa: E501 + """EditMilestoneOption - a model defined in Swagger""" # noqa: E501 + + self._description = None + self._due_on = None + self._state = None + self._title = None + self.discriminator = None + + if description is not None: + self.description = description + if due_on is not None: + self.due_on = due_on + if state is not None: + self.state = state + if title is not None: + self.title = title + + @property + def description(self): + """Gets the description of this EditMilestoneOption. # noqa: E501 + + + :return: The description of this EditMilestoneOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this EditMilestoneOption. + + + :param description: The description of this EditMilestoneOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def due_on(self): + """Gets the due_on of this EditMilestoneOption. # noqa: E501 + + + :return: The due_on of this EditMilestoneOption. # noqa: E501 + :rtype: datetime + """ + return self._due_on + + @due_on.setter + def due_on(self, due_on): + """Sets the due_on of this EditMilestoneOption. + + + :param due_on: The due_on of this EditMilestoneOption. # noqa: E501 + :type: datetime + """ + + self._due_on = due_on + + @property + def state(self): + """Gets the state of this EditMilestoneOption. # noqa: E501 + + + :return: The state of this EditMilestoneOption. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this EditMilestoneOption. + + + :param state: The state of this EditMilestoneOption. # noqa: E501 + :type: str + """ + + self._state = state + + @property + def title(self): + """Gets the title of this EditMilestoneOption. # noqa: E501 + + + :return: The title of this EditMilestoneOption. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this EditMilestoneOption. + + + :param title: The title of this EditMilestoneOption. # noqa: E501 + :type: str + """ + + self._title = title + + 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(EditMilestoneOption, 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, EditMilestoneOption): + 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/giteapython/models/edit_org_option.py b/giteapython/models/edit_org_option.py new file mode 100644 index 0000000..dd73c44 --- /dev/null +++ b/giteapython/models/edit_org_option.py @@ -0,0 +1,253 @@ +# 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 EditOrgOption(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 = { + 'description': 'str', + 'full_name': 'str', + 'location': 'str', + 'repo_admin_change_team_access': 'bool', + 'visibility': 'str', + 'website': 'str' + } + + attribute_map = { + 'description': 'description', + 'full_name': 'full_name', + 'location': 'location', + 'repo_admin_change_team_access': 'repo_admin_change_team_access', + 'visibility': 'visibility', + 'website': 'website' + } + + def __init__(self, description=None, full_name=None, location=None, repo_admin_change_team_access=None, visibility=None, website=None): # noqa: E501 + """EditOrgOption - a model defined in Swagger""" # noqa: E501 + + self._description = None + self._full_name = None + self._location = None + self._repo_admin_change_team_access = None + self._visibility = None + self._website = None + self.discriminator = None + + if description is not None: + self.description = description + if full_name is not None: + self.full_name = full_name + if location is not None: + self.location = location + if repo_admin_change_team_access is not None: + self.repo_admin_change_team_access = repo_admin_change_team_access + if visibility is not None: + self.visibility = visibility + if website is not None: + self.website = website + + @property + def description(self): + """Gets the description of this EditOrgOption. # noqa: E501 + + + :return: The description of this EditOrgOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this EditOrgOption. + + + :param description: The description of this EditOrgOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def full_name(self): + """Gets the full_name of this EditOrgOption. # noqa: E501 + + + :return: The full_name of this EditOrgOption. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this EditOrgOption. + + + :param full_name: The full_name of this EditOrgOption. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def location(self): + """Gets the location of this EditOrgOption. # noqa: E501 + + + :return: The location of this EditOrgOption. # noqa: E501 + :rtype: str + """ + return self._location + + @location.setter + def location(self, location): + """Sets the location of this EditOrgOption. + + + :param location: The location of this EditOrgOption. # noqa: E501 + :type: str + """ + + self._location = location + + @property + def repo_admin_change_team_access(self): + """Gets the repo_admin_change_team_access of this EditOrgOption. # noqa: E501 + + + :return: The repo_admin_change_team_access of this EditOrgOption. # noqa: E501 + :rtype: bool + """ + return self._repo_admin_change_team_access + + @repo_admin_change_team_access.setter + def repo_admin_change_team_access(self, repo_admin_change_team_access): + """Sets the repo_admin_change_team_access of this EditOrgOption. + + + :param repo_admin_change_team_access: The repo_admin_change_team_access of this EditOrgOption. # noqa: E501 + :type: bool + """ + + self._repo_admin_change_team_access = repo_admin_change_team_access + + @property + def visibility(self): + """Gets the visibility of this EditOrgOption. # noqa: E501 + + possible values are `public`, `limited` or `private` # noqa: E501 + + :return: The visibility of this EditOrgOption. # noqa: E501 + :rtype: str + """ + return self._visibility + + @visibility.setter + def visibility(self, visibility): + """Sets the visibility of this EditOrgOption. + + possible values are `public`, `limited` or `private` # noqa: E501 + + :param visibility: The visibility of this EditOrgOption. # noqa: E501 + :type: str + """ + allowed_values = ["public", "limited", "private"] # noqa: E501 + if visibility not in allowed_values: + raise ValueError( + "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 + .format(visibility, allowed_values) + ) + + self._visibility = visibility + + @property + def website(self): + """Gets the website of this EditOrgOption. # noqa: E501 + + + :return: The website of this EditOrgOption. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this EditOrgOption. + + + :param website: The website of this EditOrgOption. # noqa: E501 + :type: str + """ + + self._website = website + + 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(EditOrgOption, 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, EditOrgOption): + 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/giteapython/models/edit_pull_request_option.py b/giteapython/models/edit_pull_request_option.py new file mode 100644 index 0000000..22ce52a --- /dev/null +++ b/giteapython/models/edit_pull_request_option.py @@ -0,0 +1,349 @@ +# 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 EditPullRequestOption(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 = { + 'assignee': 'str', + 'assignees': 'list[str]', + 'base': 'str', + 'body': 'str', + 'due_date': 'datetime', + 'labels': 'list[int]', + 'milestone': 'int', + 'state': 'str', + 'title': 'str', + 'unset_due_date': 'bool' + } + + attribute_map = { + 'assignee': 'assignee', + 'assignees': 'assignees', + 'base': 'base', + 'body': 'body', + 'due_date': 'due_date', + 'labels': 'labels', + 'milestone': 'milestone', + 'state': 'state', + 'title': 'title', + 'unset_due_date': 'unset_due_date' + } + + def __init__(self, assignee=None, assignees=None, base=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 + self._assignees = None + self._base = None + self._body = None + self._due_date = None + self._labels = None + self._milestone = None + self._state = None + self._title = None + self._unset_due_date = None + self.discriminator = None + + if assignee is not None: + self.assignee = assignee + if assignees is not None: + self.assignees = assignees + if base is not None: + self.base = base + if body is not None: + self.body = body + if due_date is not None: + self.due_date = due_date + if labels is not None: + self.labels = labels + if milestone is not None: + self.milestone = milestone + if state is not None: + 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): + """Gets the assignee of this EditPullRequestOption. # noqa: E501 + + + :return: The assignee of this EditPullRequestOption. # noqa: E501 + :rtype: str + """ + return self._assignee + + @assignee.setter + def assignee(self, assignee): + """Sets the assignee of this EditPullRequestOption. + + + :param assignee: The assignee of this EditPullRequestOption. # noqa: E501 + :type: str + """ + + self._assignee = assignee + + @property + def assignees(self): + """Gets the assignees of this EditPullRequestOption. # noqa: E501 + + + :return: The assignees of this EditPullRequestOption. # noqa: E501 + :rtype: list[str] + """ + return self._assignees + + @assignees.setter + def assignees(self, assignees): + """Sets the assignees of this EditPullRequestOption. + + + :param assignees: The assignees of this EditPullRequestOption. # noqa: E501 + :type: list[str] + """ + + self._assignees = assignees + + @property + def base(self): + """Gets the base of this EditPullRequestOption. # noqa: E501 + + + :return: The base of this EditPullRequestOption. # noqa: E501 + :rtype: str + """ + return self._base + + @base.setter + def base(self, base): + """Sets the base of this EditPullRequestOption. + + + :param base: The base of this EditPullRequestOption. # noqa: E501 + :type: str + """ + + self._base = base + + @property + def body(self): + """Gets the body of this EditPullRequestOption. # noqa: E501 + + + :return: The body of this EditPullRequestOption. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this EditPullRequestOption. + + + :param body: The body of this EditPullRequestOption. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def due_date(self): + """Gets the due_date of this EditPullRequestOption. # noqa: E501 + + + :return: The due_date of this EditPullRequestOption. # noqa: E501 + :rtype: datetime + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this EditPullRequestOption. + + + :param due_date: The due_date of this EditPullRequestOption. # noqa: E501 + :type: datetime + """ + + self._due_date = due_date + + @property + def labels(self): + """Gets the labels of this EditPullRequestOption. # noqa: E501 + + + :return: The labels of this EditPullRequestOption. # noqa: E501 + :rtype: list[int] + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this EditPullRequestOption. + + + :param labels: The labels of this EditPullRequestOption. # noqa: E501 + :type: list[int] + """ + + self._labels = labels + + @property + def milestone(self): + """Gets the milestone of this EditPullRequestOption. # noqa: E501 + + + :return: The milestone of this EditPullRequestOption. # noqa: E501 + :rtype: int + """ + return self._milestone + + @milestone.setter + def milestone(self, milestone): + """Sets the milestone of this EditPullRequestOption. + + + :param milestone: The milestone of this EditPullRequestOption. # noqa: E501 + :type: int + """ + + self._milestone = milestone + + @property + def state(self): + """Gets the state of this EditPullRequestOption. # noqa: E501 + + + :return: The state of this EditPullRequestOption. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this EditPullRequestOption. + + + :param state: The state of this EditPullRequestOption. # noqa: E501 + :type: str + """ + + self._state = state + + @property + def title(self): + """Gets the title of this EditPullRequestOption. # noqa: E501 + + + :return: The title of this EditPullRequestOption. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this EditPullRequestOption. + + + :param title: The title of this EditPullRequestOption. # noqa: E501 + :type: str + """ + + 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 = {} + + 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(EditPullRequestOption, 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, EditPullRequestOption): + 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/giteapython/models/edit_reaction_option.py b/giteapython/models/edit_reaction_option.py new file mode 100644 index 0000000..d13971f --- /dev/null +++ b/giteapython/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/giteapython/models/edit_release_option.py b/giteapython/models/edit_release_option.py new file mode 100644 index 0000000..891a2cc --- /dev/null +++ b/giteapython/models/edit_release_option.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 EditReleaseOption(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', + 'draft': 'bool', + 'name': 'str', + 'prerelease': 'bool', + 'tag_name': 'str', + 'target_commitish': 'str' + } + + attribute_map = { + 'body': 'body', + 'draft': 'draft', + 'name': 'name', + 'prerelease': 'prerelease', + 'tag_name': 'tag_name', + 'target_commitish': 'target_commitish' + } + + def __init__(self, body=None, draft=None, name=None, prerelease=None, tag_name=None, target_commitish=None): # noqa: E501 + """EditReleaseOption - a model defined in Swagger""" # noqa: E501 + + self._body = None + self._draft = None + self._name = None + self._prerelease = None + self._tag_name = None + self._target_commitish = None + self.discriminator = None + + if body is not None: + self.body = body + if draft is not None: + self.draft = draft + if name is not None: + self.name = name + if prerelease is not None: + self.prerelease = prerelease + if tag_name is not None: + self.tag_name = tag_name + if target_commitish is not None: + self.target_commitish = target_commitish + + @property + def body(self): + """Gets the body of this EditReleaseOption. # noqa: E501 + + + :return: The body of this EditReleaseOption. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this EditReleaseOption. + + + :param body: The body of this EditReleaseOption. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def draft(self): + """Gets the draft of this EditReleaseOption. # noqa: E501 + + + :return: The draft of this EditReleaseOption. # noqa: E501 + :rtype: bool + """ + return self._draft + + @draft.setter + def draft(self, draft): + """Sets the draft of this EditReleaseOption. + + + :param draft: The draft of this EditReleaseOption. # noqa: E501 + :type: bool + """ + + self._draft = draft + + @property + def name(self): + """Gets the name of this EditReleaseOption. # noqa: E501 + + + :return: The name of this EditReleaseOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this EditReleaseOption. + + + :param name: The name of this EditReleaseOption. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def prerelease(self): + """Gets the prerelease of this EditReleaseOption. # noqa: E501 + + + :return: The prerelease of this EditReleaseOption. # noqa: E501 + :rtype: bool + """ + return self._prerelease + + @prerelease.setter + def prerelease(self, prerelease): + """Sets the prerelease of this EditReleaseOption. + + + :param prerelease: The prerelease of this EditReleaseOption. # noqa: E501 + :type: bool + """ + + self._prerelease = prerelease + + @property + def tag_name(self): + """Gets the tag_name of this EditReleaseOption. # noqa: E501 + + + :return: The tag_name of this EditReleaseOption. # noqa: E501 + :rtype: str + """ + return self._tag_name + + @tag_name.setter + def tag_name(self, tag_name): + """Sets the tag_name of this EditReleaseOption. + + + :param tag_name: The tag_name of this EditReleaseOption. # noqa: E501 + :type: str + """ + + self._tag_name = tag_name + + @property + def target_commitish(self): + """Gets the target_commitish of this EditReleaseOption. # noqa: E501 + + + :return: The target_commitish of this EditReleaseOption. # noqa: E501 + :rtype: str + """ + return self._target_commitish + + @target_commitish.setter + def target_commitish(self, target_commitish): + """Sets the target_commitish of this EditReleaseOption. + + + :param target_commitish: The target_commitish of this EditReleaseOption. # noqa: E501 + :type: str + """ + + self._target_commitish = target_commitish + + 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(EditReleaseOption, 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, EditReleaseOption): + 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/giteapython/models/edit_repo_option.py b/giteapython/models/edit_repo_option.py new file mode 100644 index 0000000..d2590b4 --- /dev/null +++ b/giteapython/models/edit_repo_option.py @@ -0,0 +1,587 @@ +# 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 EditRepoOption(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 = { + 'allow_merge_commits': 'bool', + 'allow_rebase': 'bool', + 'allow_rebase_explicit': 'bool', + 'allow_squash_merge': 'bool', + 'archived': 'bool', + 'default_branch': 'str', + 'description': 'str', + 'external_tracker': 'ExternalTracker', + 'external_wiki': 'ExternalWiki', + 'has_issues': 'bool', + 'has_pull_requests': 'bool', + 'has_wiki': 'bool', + 'ignore_whitespace_conflicts': 'bool', + 'internal_tracker': 'InternalTracker', + 'name': 'str', + 'private': 'bool', + 'template': 'bool', + 'website': 'str' + } + + attribute_map = { + 'allow_merge_commits': 'allow_merge_commits', + 'allow_rebase': 'allow_rebase', + 'allow_rebase_explicit': 'allow_rebase_explicit', + 'allow_squash_merge': 'allow_squash_merge', + 'archived': 'archived', + 'default_branch': 'default_branch', + 'description': 'description', + 'external_tracker': 'external_tracker', + 'external_wiki': 'external_wiki', + 'has_issues': 'has_issues', + 'has_pull_requests': 'has_pull_requests', + 'has_wiki': 'has_wiki', + 'ignore_whitespace_conflicts': 'ignore_whitespace_conflicts', + '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, template=None, website=None): # noqa: E501 + """EditRepoOption - a model defined in Swagger""" # noqa: E501 + + self._allow_merge_commits = None + self._allow_rebase = None + self._allow_rebase_explicit = None + self._allow_squash_merge = None + self._archived = None + self._default_branch = None + self._description = None + self._external_tracker = None + self._external_wiki = None + self._has_issues = None + self._has_pull_requests = None + self._has_wiki = None + self._ignore_whitespace_conflicts = None + self._internal_tracker = None + self._name = None + self._private = None + self._template = None + self._website = None + self.discriminator = None + + if allow_merge_commits is not None: + self.allow_merge_commits = allow_merge_commits + if allow_rebase is not None: + self.allow_rebase = allow_rebase + if allow_rebase_explicit is not None: + self.allow_rebase_explicit = allow_rebase_explicit + if allow_squash_merge is not None: + self.allow_squash_merge = allow_squash_merge + if archived is not None: + self.archived = archived + if default_branch is not None: + self.default_branch = default_branch + if description is not None: + self.description = description + if external_tracker is not None: + self.external_tracker = external_tracker + if external_wiki is not None: + self.external_wiki = external_wiki + if has_issues is not None: + self.has_issues = has_issues + if has_pull_requests is not None: + self.has_pull_requests = has_pull_requests + if has_wiki is not None: + self.has_wiki = has_wiki + if ignore_whitespace_conflicts is not None: + self.ignore_whitespace_conflicts = ignore_whitespace_conflicts + if internal_tracker is not None: + self.internal_tracker = internal_tracker + if name is not None: + 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 + + @property + def allow_merge_commits(self): + """Gets the allow_merge_commits of this EditRepoOption. # noqa: E501 + + 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`. # noqa: E501 + + :return: The allow_merge_commits of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._allow_merge_commits + + @allow_merge_commits.setter + def allow_merge_commits(self, allow_merge_commits): + """Sets the allow_merge_commits of this EditRepoOption. + + 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`. # noqa: E501 + + :param allow_merge_commits: The allow_merge_commits of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._allow_merge_commits = allow_merge_commits + + @property + def allow_rebase(self): + """Gets the allow_rebase of this EditRepoOption. # noqa: E501 + + either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`. # noqa: E501 + + :return: The allow_rebase of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._allow_rebase + + @allow_rebase.setter + def allow_rebase(self, allow_rebase): + """Sets the allow_rebase of this EditRepoOption. + + either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`. # noqa: E501 + + :param allow_rebase: The allow_rebase of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._allow_rebase = allow_rebase + + @property + def allow_rebase_explicit(self): + """Gets the allow_rebase_explicit of this EditRepoOption. # noqa: E501 + + 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`. # noqa: E501 + + :return: The allow_rebase_explicit of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._allow_rebase_explicit + + @allow_rebase_explicit.setter + def allow_rebase_explicit(self, allow_rebase_explicit): + """Sets the allow_rebase_explicit of this EditRepoOption. + + 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`. # noqa: E501 + + :param allow_rebase_explicit: The allow_rebase_explicit of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._allow_rebase_explicit = allow_rebase_explicit + + @property + def allow_squash_merge(self): + """Gets the allow_squash_merge of this EditRepoOption. # noqa: E501 + + either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`. # noqa: E501 + + :return: The allow_squash_merge of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._allow_squash_merge + + @allow_squash_merge.setter + def allow_squash_merge(self, allow_squash_merge): + """Sets the allow_squash_merge of this EditRepoOption. + + either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`. # noqa: E501 + + :param allow_squash_merge: The allow_squash_merge of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._allow_squash_merge = allow_squash_merge + + @property + def archived(self): + """Gets the archived of this EditRepoOption. # noqa: E501 + + set to `true` to archive this repository. # noqa: E501 + + :return: The archived of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._archived + + @archived.setter + def archived(self, archived): + """Sets the archived of this EditRepoOption. + + set to `true` to archive this repository. # noqa: E501 + + :param archived: The archived of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._archived = archived + + @property + def default_branch(self): + """Gets the default_branch of this EditRepoOption. # noqa: E501 + + sets the default branch for this repository. # noqa: E501 + + :return: The default_branch of this EditRepoOption. # noqa: E501 + :rtype: str + """ + return self._default_branch + + @default_branch.setter + def default_branch(self, default_branch): + """Sets the default_branch of this EditRepoOption. + + sets the default branch for this repository. # noqa: E501 + + :param default_branch: The default_branch of this EditRepoOption. # noqa: E501 + :type: str + """ + + self._default_branch = default_branch + + @property + def description(self): + """Gets the description of this EditRepoOption. # noqa: E501 + + a short description of the repository. # noqa: E501 + + :return: The description of this EditRepoOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this EditRepoOption. + + a short description of the repository. # noqa: E501 + + :param description: The description of this EditRepoOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def external_tracker(self): + """Gets the external_tracker of this EditRepoOption. # noqa: E501 + + + :return: The external_tracker of this EditRepoOption. # noqa: E501 + :rtype: ExternalTracker + """ + return self._external_tracker + + @external_tracker.setter + def external_tracker(self, external_tracker): + """Sets the external_tracker of this EditRepoOption. + + + :param external_tracker: The external_tracker of this EditRepoOption. # noqa: E501 + :type: ExternalTracker + """ + + self._external_tracker = external_tracker + + @property + def external_wiki(self): + """Gets the external_wiki of this EditRepoOption. # noqa: E501 + + + :return: The external_wiki of this EditRepoOption. # noqa: E501 + :rtype: ExternalWiki + """ + return self._external_wiki + + @external_wiki.setter + def external_wiki(self, external_wiki): + """Sets the external_wiki of this EditRepoOption. + + + :param external_wiki: The external_wiki of this EditRepoOption. # noqa: E501 + :type: ExternalWiki + """ + + self._external_wiki = external_wiki + + @property + def has_issues(self): + """Gets the has_issues of this EditRepoOption. # noqa: E501 + + either `true` to enable issues for this repository or `false` to disable them. # noqa: E501 + + :return: The has_issues of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._has_issues + + @has_issues.setter + def has_issues(self, has_issues): + """Sets the has_issues of this EditRepoOption. + + either `true` to enable issues for this repository or `false` to disable them. # noqa: E501 + + :param has_issues: The has_issues of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._has_issues = has_issues + + @property + def has_pull_requests(self): + """Gets the has_pull_requests of this EditRepoOption. # noqa: E501 + + either `true` to allow pull requests, or `false` to prevent pull request. # noqa: E501 + + :return: The has_pull_requests of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._has_pull_requests + + @has_pull_requests.setter + def has_pull_requests(self, has_pull_requests): + """Sets the has_pull_requests of this EditRepoOption. + + either `true` to allow pull requests, or `false` to prevent pull request. # noqa: E501 + + :param has_pull_requests: The has_pull_requests of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._has_pull_requests = has_pull_requests + + @property + def has_wiki(self): + """Gets the has_wiki of this EditRepoOption. # noqa: E501 + + either `true` to enable the wiki for this repository or `false` to disable it. # noqa: E501 + + :return: The has_wiki of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._has_wiki + + @has_wiki.setter + def has_wiki(self, has_wiki): + """Sets the has_wiki of this EditRepoOption. + + either `true` to enable the wiki for this repository or `false` to disable it. # noqa: E501 + + :param has_wiki: The has_wiki of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._has_wiki = has_wiki + + @property + def ignore_whitespace_conflicts(self): + """Gets the ignore_whitespace_conflicts of this EditRepoOption. # noqa: E501 + + either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`. # noqa: E501 + + :return: The ignore_whitespace_conflicts of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._ignore_whitespace_conflicts + + @ignore_whitespace_conflicts.setter + def ignore_whitespace_conflicts(self, ignore_whitespace_conflicts): + """Sets the ignore_whitespace_conflicts of this EditRepoOption. + + either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`. # noqa: E501 + + :param ignore_whitespace_conflicts: The ignore_whitespace_conflicts of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._ignore_whitespace_conflicts = ignore_whitespace_conflicts + + @property + def internal_tracker(self): + """Gets the internal_tracker of this EditRepoOption. # noqa: E501 + + + :return: The internal_tracker of this EditRepoOption. # noqa: E501 + :rtype: InternalTracker + """ + return self._internal_tracker + + @internal_tracker.setter + def internal_tracker(self, internal_tracker): + """Sets the internal_tracker of this EditRepoOption. + + + :param internal_tracker: The internal_tracker of this EditRepoOption. # noqa: E501 + :type: InternalTracker + """ + + self._internal_tracker = internal_tracker + + @property + def name(self): + """Gets the name of this EditRepoOption. # noqa: E501 + + name of the repository # noqa: E501 + + :return: The name of this EditRepoOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this EditRepoOption. + + name of the repository # noqa: E501 + + :param name: The name of this EditRepoOption. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def private(self): + """Gets the private of this EditRepoOption. # noqa: E501 + + 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. # noqa: E501 + + :return: The private of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._private + + @private.setter + def private(self, private): + """Sets the private of this EditRepoOption. + + 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. # noqa: E501 + + :param private: The private of this EditRepoOption. # noqa: E501 + :type: bool + """ + + 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 + + a URL with more information about the repository. # noqa: E501 + + :return: The website of this EditRepoOption. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this EditRepoOption. + + a URL with more information about the repository. # noqa: E501 + + :param website: The website of this EditRepoOption. # noqa: E501 + :type: str + """ + + self._website = website + + 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(EditRepoOption, 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, EditRepoOption): + 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/giteapython/models/edit_team_option.py b/giteapython/models/edit_team_option.py new file mode 100644 index 0000000..77f6c98 --- /dev/null +++ b/giteapython/models/edit_team_option.py @@ -0,0 +1,252 @@ +# 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 EditTeamOption(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 = { + '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, 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 + + + :return: The description of this EditTeamOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this EditTeamOption. + + + :param description: The description of this EditTeamOption. # noqa: E501 + :type: str + """ + + 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 + + + :return: The name of this EditTeamOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this EditTeamOption. + + + :param name: The name of this EditTeamOption. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def permission(self): + """Gets the permission of this EditTeamOption. # noqa: E501 + + + :return: The permission of this EditTeamOption. # noqa: E501 + :rtype: str + """ + return self._permission + + @permission.setter + def permission(self, permission): + """Sets the permission of this EditTeamOption. + + + :param permission: The permission of this EditTeamOption. # noqa: E501 + :type: str + """ + allowed_values = ["read", "write", "admin"] # noqa: E501 + if permission not in allowed_values: + raise ValueError( + "Invalid value for `permission` ({0}), must be one of {1}" # noqa: E501 + .format(permission, allowed_values) + ) + + self._permission = permission + + @property + def units(self): + """Gets the units of this EditTeamOption. # noqa: E501 + + + :return: The units of this EditTeamOption. # noqa: E501 + :rtype: list[str] + """ + return self._units + + @units.setter + def units(self, units): + """Sets the units of this EditTeamOption. + + + :param units: The units of this EditTeamOption. # noqa: E501 + :type: list[str] + """ + + self._units = units + + 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(EditTeamOption, 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, EditTeamOption): + 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/giteapython/models/edit_user_option.py b/giteapython/models/edit_user_option.py new file mode 100644 index 0000000..078d32c --- /dev/null +++ b/giteapython/models/edit_user_option.py @@ -0,0 +1,480 @@ +# 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 EditUserOption(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 = { + 'active': 'bool', + 'admin': 'bool', + 'allow_create_organization': 'bool', + 'allow_git_hook': 'bool', + 'allow_import_local': 'bool', + 'email': 'str', + 'full_name': 'str', + 'location': 'str', + 'login_name': 'str', + 'max_repo_creation': 'int', + 'must_change_password': 'bool', + 'password': 'str', + 'prohibit_login': 'bool', + 'source_id': 'int', + 'website': 'str' + } + + attribute_map = { + 'active': 'active', + 'admin': 'admin', + 'allow_create_organization': 'allow_create_organization', + 'allow_git_hook': 'allow_git_hook', + 'allow_import_local': 'allow_import_local', + 'email': 'email', + 'full_name': 'full_name', + 'location': 'location', + 'login_name': 'login_name', + 'max_repo_creation': 'max_repo_creation', + 'must_change_password': 'must_change_password', + 'password': 'password', + 'prohibit_login': 'prohibit_login', + 'source_id': 'source_id', + 'website': 'website' + } + + def __init__(self, active=None, admin=None, allow_create_organization=None, allow_git_hook=None, allow_import_local=None, email=None, full_name=None, location=None, login_name=None, max_repo_creation=None, must_change_password=None, password=None, prohibit_login=None, source_id=None, website=None): # noqa: E501 + """EditUserOption - a model defined in Swagger""" # noqa: E501 + + self._active = None + self._admin = None + self._allow_create_organization = None + self._allow_git_hook = None + self._allow_import_local = None + self._email = None + self._full_name = None + self._location = None + self._login_name = None + self._max_repo_creation = None + self._must_change_password = None + self._password = None + self._prohibit_login = None + self._source_id = None + self._website = None + self.discriminator = None + + if active is not None: + self.active = active + if admin is not None: + self.admin = admin + if allow_create_organization is not None: + self.allow_create_organization = allow_create_organization + if allow_git_hook is not None: + self.allow_git_hook = allow_git_hook + if allow_import_local is not None: + self.allow_import_local = allow_import_local + self.email = email + if full_name is not None: + self.full_name = full_name + if location is not None: + self.location = location + if login_name is not None: + self.login_name = login_name + if max_repo_creation is not None: + self.max_repo_creation = max_repo_creation + if must_change_password is not None: + self.must_change_password = must_change_password + if password is not None: + self.password = password + if prohibit_login is not None: + self.prohibit_login = prohibit_login + if source_id is not None: + self.source_id = source_id + if website is not None: + self.website = website + + @property + def active(self): + """Gets the active of this EditUserOption. # noqa: E501 + + + :return: The active of this EditUserOption. # noqa: E501 + :rtype: bool + """ + return self._active + + @active.setter + def active(self, active): + """Sets the active of this EditUserOption. + + + :param active: The active of this EditUserOption. # noqa: E501 + :type: bool + """ + + self._active = active + + @property + def admin(self): + """Gets the admin of this EditUserOption. # noqa: E501 + + + :return: The admin of this EditUserOption. # noqa: E501 + :rtype: bool + """ + return self._admin + + @admin.setter + def admin(self, admin): + """Sets the admin of this EditUserOption. + + + :param admin: The admin of this EditUserOption. # noqa: E501 + :type: bool + """ + + self._admin = admin + + @property + def allow_create_organization(self): + """Gets the allow_create_organization of this EditUserOption. # noqa: E501 + + + :return: The allow_create_organization of this EditUserOption. # noqa: E501 + :rtype: bool + """ + return self._allow_create_organization + + @allow_create_organization.setter + def allow_create_organization(self, allow_create_organization): + """Sets the allow_create_organization of this EditUserOption. + + + :param allow_create_organization: The allow_create_organization of this EditUserOption. # noqa: E501 + :type: bool + """ + + self._allow_create_organization = allow_create_organization + + @property + def allow_git_hook(self): + """Gets the allow_git_hook of this EditUserOption. # noqa: E501 + + + :return: The allow_git_hook of this EditUserOption. # noqa: E501 + :rtype: bool + """ + return self._allow_git_hook + + @allow_git_hook.setter + def allow_git_hook(self, allow_git_hook): + """Sets the allow_git_hook of this EditUserOption. + + + :param allow_git_hook: The allow_git_hook of this EditUserOption. # noqa: E501 + :type: bool + """ + + self._allow_git_hook = allow_git_hook + + @property + def allow_import_local(self): + """Gets the allow_import_local of this EditUserOption. # noqa: E501 + + + :return: The allow_import_local of this EditUserOption. # noqa: E501 + :rtype: bool + """ + return self._allow_import_local + + @allow_import_local.setter + def allow_import_local(self, allow_import_local): + """Sets the allow_import_local of this EditUserOption. + + + :param allow_import_local: The allow_import_local of this EditUserOption. # noqa: E501 + :type: bool + """ + + self._allow_import_local = allow_import_local + + @property + def email(self): + """Gets the email of this EditUserOption. # noqa: E501 + + + :return: The email of this EditUserOption. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this EditUserOption. + + + :param email: The email of this EditUserOption. # noqa: E501 + :type: str + """ + if email is None: + raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501 + + self._email = email + + @property + def full_name(self): + """Gets the full_name of this EditUserOption. # noqa: E501 + + + :return: The full_name of this EditUserOption. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this EditUserOption. + + + :param full_name: The full_name of this EditUserOption. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def location(self): + """Gets the location of this EditUserOption. # noqa: E501 + + + :return: The location of this EditUserOption. # noqa: E501 + :rtype: str + """ + return self._location + + @location.setter + def location(self, location): + """Sets the location of this EditUserOption. + + + :param location: The location of this EditUserOption. # noqa: E501 + :type: str + """ + + self._location = location + + @property + def login_name(self): + """Gets the login_name of this EditUserOption. # noqa: E501 + + + :return: The login_name of this EditUserOption. # noqa: E501 + :rtype: str + """ + return self._login_name + + @login_name.setter + def login_name(self, login_name): + """Sets the login_name of this EditUserOption. + + + :param login_name: The login_name of this EditUserOption. # noqa: E501 + :type: str + """ + + self._login_name = login_name + + @property + def max_repo_creation(self): + """Gets the max_repo_creation of this EditUserOption. # noqa: E501 + + + :return: The max_repo_creation of this EditUserOption. # noqa: E501 + :rtype: int + """ + return self._max_repo_creation + + @max_repo_creation.setter + def max_repo_creation(self, max_repo_creation): + """Sets the max_repo_creation of this EditUserOption. + + + :param max_repo_creation: The max_repo_creation of this EditUserOption. # noqa: E501 + :type: int + """ + + self._max_repo_creation = max_repo_creation + + @property + def must_change_password(self): + """Gets the must_change_password of this EditUserOption. # noqa: E501 + + + :return: The must_change_password of this EditUserOption. # noqa: E501 + :rtype: bool + """ + return self._must_change_password + + @must_change_password.setter + def must_change_password(self, must_change_password): + """Sets the must_change_password of this EditUserOption. + + + :param must_change_password: The must_change_password of this EditUserOption. # noqa: E501 + :type: bool + """ + + self._must_change_password = must_change_password + + @property + def password(self): + """Gets the password of this EditUserOption. # noqa: E501 + + + :return: The password of this EditUserOption. # noqa: E501 + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this EditUserOption. + + + :param password: The password of this EditUserOption. # noqa: E501 + :type: str + """ + + self._password = password + + @property + def prohibit_login(self): + """Gets the prohibit_login of this EditUserOption. # noqa: E501 + + + :return: The prohibit_login of this EditUserOption. # noqa: E501 + :rtype: bool + """ + return self._prohibit_login + + @prohibit_login.setter + def prohibit_login(self, prohibit_login): + """Sets the prohibit_login of this EditUserOption. + + + :param prohibit_login: The prohibit_login of this EditUserOption. # noqa: E501 + :type: bool + """ + + self._prohibit_login = prohibit_login + + @property + def source_id(self): + """Gets the source_id of this EditUserOption. # noqa: E501 + + + :return: The source_id of this EditUserOption. # noqa: E501 + :rtype: int + """ + return self._source_id + + @source_id.setter + def source_id(self, source_id): + """Sets the source_id of this EditUserOption. + + + :param source_id: The source_id of this EditUserOption. # noqa: E501 + :type: int + """ + + self._source_id = source_id + + @property + def website(self): + """Gets the website of this EditUserOption. # noqa: E501 + + + :return: The website of this EditUserOption. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this EditUserOption. + + + :param website: The website of this EditUserOption. # noqa: E501 + :type: str + """ + + self._website = website + + 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(EditUserOption, 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, EditUserOption): + 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/giteapython/models/email.py b/giteapython/models/email.py new file mode 100644 index 0000000..edfb8ac --- /dev/null +++ b/giteapython/models/email.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 Email(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 = { + 'email': 'str', + 'primary': 'bool', + 'verified': 'bool' + } + + attribute_map = { + 'email': 'email', + 'primary': 'primary', + 'verified': 'verified' + } + + def __init__(self, email=None, primary=None, verified=None): # noqa: E501 + """Email - a model defined in Swagger""" # noqa: E501 + + self._email = None + self._primary = None + self._verified = None + self.discriminator = None + + if email is not None: + self.email = email + if primary is not None: + self.primary = primary + if verified is not None: + self.verified = verified + + @property + def email(self): + """Gets the email of this Email. # noqa: E501 + + + :return: The email of this Email. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this Email. + + + :param email: The email of this Email. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def primary(self): + """Gets the primary of this Email. # noqa: E501 + + + :return: The primary of this Email. # noqa: E501 + :rtype: bool + """ + return self._primary + + @primary.setter + def primary(self, primary): + """Sets the primary of this Email. + + + :param primary: The primary of this Email. # noqa: E501 + :type: bool + """ + + self._primary = primary + + @property + def verified(self): + """Gets the verified of this Email. # noqa: E501 + + + :return: The verified of this Email. # noqa: E501 + :rtype: bool + """ + return self._verified + + @verified.setter + def verified(self, verified): + """Sets the verified of this Email. + + + :param verified: The verified of this Email. # noqa: E501 + :type: bool + """ + + self._verified = verified + + 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(Email, 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, Email): + 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/giteapython/models/external_tracker.py b/giteapython/models/external_tracker.py new file mode 100644 index 0000000..de632dc --- /dev/null +++ b/giteapython/models/external_tracker.py @@ -0,0 +1,173 @@ +# 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 ExternalTracker(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 = { + 'external_tracker_format': 'str', + 'external_tracker_style': 'str', + 'external_tracker_url': 'str' + } + + attribute_map = { + 'external_tracker_format': 'external_tracker_format', + 'external_tracker_style': 'external_tracker_style', + 'external_tracker_url': 'external_tracker_url' + } + + def __init__(self, external_tracker_format=None, external_tracker_style=None, external_tracker_url=None): # noqa: E501 + """ExternalTracker - a model defined in Swagger""" # noqa: E501 + + self._external_tracker_format = None + self._external_tracker_style = None + self._external_tracker_url = None + self.discriminator = None + + if external_tracker_format is not None: + self.external_tracker_format = external_tracker_format + if external_tracker_style is not None: + self.external_tracker_style = external_tracker_style + if external_tracker_url is not None: + self.external_tracker_url = external_tracker_url + + @property + def external_tracker_format(self): + """Gets the external_tracker_format of this ExternalTracker. # noqa: E501 + + External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index. # noqa: E501 + + :return: The external_tracker_format of this ExternalTracker. # noqa: E501 + :rtype: str + """ + return self._external_tracker_format + + @external_tracker_format.setter + def external_tracker_format(self, external_tracker_format): + """Sets the external_tracker_format of this ExternalTracker. + + External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index. # noqa: E501 + + :param external_tracker_format: The external_tracker_format of this ExternalTracker. # noqa: E501 + :type: str + """ + + self._external_tracker_format = external_tracker_format + + @property + def external_tracker_style(self): + """Gets the external_tracker_style of this ExternalTracker. # noqa: E501 + + External Issue Tracker Number Format, either `numeric` or `alphanumeric` # noqa: E501 + + :return: The external_tracker_style of this ExternalTracker. # noqa: E501 + :rtype: str + """ + return self._external_tracker_style + + @external_tracker_style.setter + def external_tracker_style(self, external_tracker_style): + """Sets the external_tracker_style of this ExternalTracker. + + External Issue Tracker Number Format, either `numeric` or `alphanumeric` # noqa: E501 + + :param external_tracker_style: The external_tracker_style of this ExternalTracker. # noqa: E501 + :type: str + """ + + self._external_tracker_style = external_tracker_style + + @property + def external_tracker_url(self): + """Gets the external_tracker_url of this ExternalTracker. # noqa: E501 + + URL of external issue tracker. # noqa: E501 + + :return: The external_tracker_url of this ExternalTracker. # noqa: E501 + :rtype: str + """ + return self._external_tracker_url + + @external_tracker_url.setter + def external_tracker_url(self, external_tracker_url): + """Sets the external_tracker_url of this ExternalTracker. + + URL of external issue tracker. # noqa: E501 + + :param external_tracker_url: The external_tracker_url of this ExternalTracker. # noqa: E501 + :type: str + """ + + self._external_tracker_url = external_tracker_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(ExternalTracker, 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, ExternalTracker): + 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/giteapython/models/external_wiki.py b/giteapython/models/external_wiki.py new file mode 100644 index 0000000..3f09ad8 --- /dev/null +++ b/giteapython/models/external_wiki.py @@ -0,0 +1,117 @@ +# 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 ExternalWiki(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 = { + 'external_wiki_url': 'str' + } + + attribute_map = { + 'external_wiki_url': 'external_wiki_url' + } + + def __init__(self, external_wiki_url=None): # noqa: E501 + """ExternalWiki - a model defined in Swagger""" # noqa: E501 + + self._external_wiki_url = None + self.discriminator = None + + if external_wiki_url is not None: + self.external_wiki_url = external_wiki_url + + @property + def external_wiki_url(self): + """Gets the external_wiki_url of this ExternalWiki. # noqa: E501 + + URL of external wiki. # noqa: E501 + + :return: The external_wiki_url of this ExternalWiki. # noqa: E501 + :rtype: str + """ + return self._external_wiki_url + + @external_wiki_url.setter + def external_wiki_url(self, external_wiki_url): + """Sets the external_wiki_url of this ExternalWiki. + + URL of external wiki. # noqa: E501 + + :param external_wiki_url: The external_wiki_url of this ExternalWiki. # noqa: E501 + :type: str + """ + + self._external_wiki_url = external_wiki_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(ExternalWiki, 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, ExternalWiki): + 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/giteapython/models/file_commit_response.py b/giteapython/models/file_commit_response.py new file mode 100644 index 0000000..04a9c63 --- /dev/null +++ b/giteapython/models/file_commit_response.py @@ -0,0 +1,297 @@ +# 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 FileCommitResponse(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': 'CommitUser', + 'committer': 'CommitUser', + 'html_url': 'str', + 'message': 'str', + 'parents': 'list[CommitMeta]', + 'sha': 'str', + 'tree': 'CommitMeta', + 'url': 'str' + } + + attribute_map = { + 'author': 'author', + 'committer': 'committer', + 'html_url': 'html_url', + 'message': 'message', + 'parents': 'parents', + 'sha': 'sha', + 'tree': 'tree', + 'url': 'url' + } + + def __init__(self, author=None, committer=None, html_url=None, message=None, parents=None, sha=None, tree=None, url=None): # noqa: E501 + """FileCommitResponse - a model defined in Swagger""" # noqa: E501 + + self._author = None + self._committer = None + self._html_url = None + self._message = None + self._parents = None + self._sha = None + self._tree = None + self._url = None + self.discriminator = None + + if author is not None: + self.author = author + if committer is not None: + self.committer = committer + if html_url is not None: + self.html_url = html_url + if message is not None: + self.message = message + if parents is not None: + self.parents = parents + if sha is not None: + self.sha = sha + if tree is not None: + self.tree = tree + if url is not None: + self.url = url + + @property + def author(self): + """Gets the author of this FileCommitResponse. # noqa: E501 + + + :return: The author of this FileCommitResponse. # noqa: E501 + :rtype: CommitUser + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this FileCommitResponse. + + + :param author: The author of this FileCommitResponse. # noqa: E501 + :type: CommitUser + """ + + self._author = author + + @property + def committer(self): + """Gets the committer of this FileCommitResponse. # noqa: E501 + + + :return: The committer of this FileCommitResponse. # noqa: E501 + :rtype: CommitUser + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this FileCommitResponse. + + + :param committer: The committer of this FileCommitResponse. # noqa: E501 + :type: CommitUser + """ + + self._committer = committer + + @property + def html_url(self): + """Gets the html_url of this FileCommitResponse. # noqa: E501 + + + :return: The html_url of this FileCommitResponse. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this FileCommitResponse. + + + :param html_url: The html_url of this FileCommitResponse. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def message(self): + """Gets the message of this FileCommitResponse. # noqa: E501 + + + :return: The message of this FileCommitResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this FileCommitResponse. + + + :param message: The message of this FileCommitResponse. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def parents(self): + """Gets the parents of this FileCommitResponse. # noqa: E501 + + + :return: The parents of this FileCommitResponse. # noqa: E501 + :rtype: list[CommitMeta] + """ + return self._parents + + @parents.setter + def parents(self, parents): + """Sets the parents of this FileCommitResponse. + + + :param parents: The parents of this FileCommitResponse. # noqa: E501 + :type: list[CommitMeta] + """ + + self._parents = parents + + @property + def sha(self): + """Gets the sha of this FileCommitResponse. # noqa: E501 + + + :return: The sha of this FileCommitResponse. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this FileCommitResponse. + + + :param sha: The sha of this FileCommitResponse. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def tree(self): + """Gets the tree of this FileCommitResponse. # noqa: E501 + + + :return: The tree of this FileCommitResponse. # noqa: E501 + :rtype: CommitMeta + """ + return self._tree + + @tree.setter + def tree(self, tree): + """Sets the tree of this FileCommitResponse. + + + :param tree: The tree of this FileCommitResponse. # noqa: E501 + :type: CommitMeta + """ + + self._tree = tree + + @property + def url(self): + """Gets the url of this FileCommitResponse. # noqa: E501 + + + :return: The url of this FileCommitResponse. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this FileCommitResponse. + + + :param url: The url of this FileCommitResponse. # 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(FileCommitResponse, 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, FileCommitResponse): + 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/giteapython/models/file_delete_response.py b/giteapython/models/file_delete_response.py new file mode 100644 index 0000000..19d2f4e --- /dev/null +++ b/giteapython/models/file_delete_response.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 FileDeleteResponse(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 = { + 'commit': 'FileCommitResponse', + 'content': 'object', + 'verification': 'PayloadCommitVerification' + } + + attribute_map = { + 'commit': 'commit', + 'content': 'content', + 'verification': 'verification' + } + + def __init__(self, commit=None, content=None, verification=None): # noqa: E501 + """FileDeleteResponse - a model defined in Swagger""" # noqa: E501 + + self._commit = None + self._content = None + self._verification = None + self.discriminator = None + + if commit is not None: + self.commit = commit + if content is not None: + self.content = content + if verification is not None: + self.verification = verification + + @property + def commit(self): + """Gets the commit of this FileDeleteResponse. # noqa: E501 + + + :return: The commit of this FileDeleteResponse. # noqa: E501 + :rtype: FileCommitResponse + """ + return self._commit + + @commit.setter + def commit(self, commit): + """Sets the commit of this FileDeleteResponse. + + + :param commit: The commit of this FileDeleteResponse. # noqa: E501 + :type: FileCommitResponse + """ + + self._commit = commit + + @property + def content(self): + """Gets the content of this FileDeleteResponse. # noqa: E501 + + + :return: The content of this FileDeleteResponse. # noqa: E501 + :rtype: object + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this FileDeleteResponse. + + + :param content: The content of this FileDeleteResponse. # noqa: E501 + :type: object + """ + + self._content = content + + @property + def verification(self): + """Gets the verification of this FileDeleteResponse. # noqa: E501 + + + :return: The verification of this FileDeleteResponse. # noqa: E501 + :rtype: PayloadCommitVerification + """ + return self._verification + + @verification.setter + def verification(self, verification): + """Sets the verification of this FileDeleteResponse. + + + :param verification: The verification of this FileDeleteResponse. # noqa: E501 + :type: PayloadCommitVerification + """ + + self._verification = verification + + 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(FileDeleteResponse, 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, FileDeleteResponse): + 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/giteapython/models/file_links_response.py b/giteapython/models/file_links_response.py new file mode 100644 index 0000000..281bc68 --- /dev/null +++ b/giteapython/models/file_links_response.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 FileLinksResponse(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 = { + 'git': 'str', + 'html': 'str', + '_self': 'str' + } + + attribute_map = { + 'git': 'git', + 'html': 'html', + '_self': 'self' + } + + def __init__(self, git=None, html=None, _self=None): # noqa: E501 + """FileLinksResponse - a model defined in Swagger""" # noqa: E501 + + self._git = None + self._html = None + self.__self = None + self.discriminator = None + + if git is not None: + self.git = git + if html is not None: + self.html = html + if _self is not None: + self._self = _self + + @property + def git(self): + """Gets the git of this FileLinksResponse. # noqa: E501 + + + :return: The git of this FileLinksResponse. # noqa: E501 + :rtype: str + """ + return self._git + + @git.setter + def git(self, git): + """Sets the git of this FileLinksResponse. + + + :param git: The git of this FileLinksResponse. # noqa: E501 + :type: str + """ + + self._git = git + + @property + def html(self): + """Gets the html of this FileLinksResponse. # noqa: E501 + + + :return: The html of this FileLinksResponse. # noqa: E501 + :rtype: str + """ + return self._html + + @html.setter + def html(self, html): + """Sets the html of this FileLinksResponse. + + + :param html: The html of this FileLinksResponse. # noqa: E501 + :type: str + """ + + self._html = html + + @property + def _self(self): + """Gets the _self of this FileLinksResponse. # noqa: E501 + + + :return: The _self of this FileLinksResponse. # noqa: E501 + :rtype: str + """ + return self.__self + + @_self.setter + def _self(self, _self): + """Sets the _self of this FileLinksResponse. + + + :param _self: The _self of this FileLinksResponse. # noqa: E501 + :type: str + """ + + self.__self = _self + + 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(FileLinksResponse, 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, FileLinksResponse): + 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/giteapython/models/file_response.py b/giteapython/models/file_response.py new file mode 100644 index 0000000..44edd2e --- /dev/null +++ b/giteapython/models/file_response.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 FileResponse(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 = { + 'commit': 'FileCommitResponse', + 'content': 'ContentsResponse', + 'verification': 'PayloadCommitVerification' + } + + attribute_map = { + 'commit': 'commit', + 'content': 'content', + 'verification': 'verification' + } + + def __init__(self, commit=None, content=None, verification=None): # noqa: E501 + """FileResponse - a model defined in Swagger""" # noqa: E501 + + self._commit = None + self._content = None + self._verification = None + self.discriminator = None + + if commit is not None: + self.commit = commit + if content is not None: + self.content = content + if verification is not None: + self.verification = verification + + @property + def commit(self): + """Gets the commit of this FileResponse. # noqa: E501 + + + :return: The commit of this FileResponse. # noqa: E501 + :rtype: FileCommitResponse + """ + return self._commit + + @commit.setter + def commit(self, commit): + """Sets the commit of this FileResponse. + + + :param commit: The commit of this FileResponse. # noqa: E501 + :type: FileCommitResponse + """ + + self._commit = commit + + @property + def content(self): + """Gets the content of this FileResponse. # noqa: E501 + + + :return: The content of this FileResponse. # noqa: E501 + :rtype: ContentsResponse + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this FileResponse. + + + :param content: The content of this FileResponse. # noqa: E501 + :type: ContentsResponse + """ + + self._content = content + + @property + def verification(self): + """Gets the verification of this FileResponse. # noqa: E501 + + + :return: The verification of this FileResponse. # noqa: E501 + :rtype: PayloadCommitVerification + """ + return self._verification + + @verification.setter + def verification(self, verification): + """Sets the verification of this FileResponse. + + + :param verification: The verification of this FileResponse. # noqa: E501 + :type: PayloadCommitVerification + """ + + self._verification = verification + + 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(FileResponse, 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, FileResponse): + 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/giteapython/models/git_blob_response.py b/giteapython/models/git_blob_response.py new file mode 100644 index 0000000..fa084f4 --- /dev/null +++ b/giteapython/models/git_blob_response.py @@ -0,0 +1,219 @@ +# 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 GitBlobResponse(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', + 'encoding': 'str', + 'sha': 'str', + 'size': 'int', + 'url': 'str' + } + + attribute_map = { + 'content': 'content', + 'encoding': 'encoding', + 'sha': 'sha', + 'size': 'size', + 'url': 'url' + } + + def __init__(self, content=None, encoding=None, sha=None, size=None, url=None): # noqa: E501 + """GitBlobResponse - a model defined in Swagger""" # noqa: E501 + + self._content = None + self._encoding = None + self._sha = None + self._size = None + self._url = None + self.discriminator = None + + if content is not None: + self.content = content + if encoding is not None: + self.encoding = encoding + if sha is not None: + self.sha = sha + if size is not None: + self.size = size + if url is not None: + self.url = url + + @property + def content(self): + """Gets the content of this GitBlobResponse. # noqa: E501 + + + :return: The content of this GitBlobResponse. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this GitBlobResponse. + + + :param content: The content of this GitBlobResponse. # noqa: E501 + :type: str + """ + + self._content = content + + @property + def encoding(self): + """Gets the encoding of this GitBlobResponse. # noqa: E501 + + + :return: The encoding of this GitBlobResponse. # noqa: E501 + :rtype: str + """ + return self._encoding + + @encoding.setter + def encoding(self, encoding): + """Sets the encoding of this GitBlobResponse. + + + :param encoding: The encoding of this GitBlobResponse. # noqa: E501 + :type: str + """ + + self._encoding = encoding + + @property + def sha(self): + """Gets the sha of this GitBlobResponse. # noqa: E501 + + + :return: The sha of this GitBlobResponse. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this GitBlobResponse. + + + :param sha: The sha of this GitBlobResponse. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def size(self): + """Gets the size of this GitBlobResponse. # noqa: E501 + + + :return: The size of this GitBlobResponse. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this GitBlobResponse. + + + :param size: The size of this GitBlobResponse. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def url(self): + """Gets the url of this GitBlobResponse. # noqa: E501 + + + :return: The url of this GitBlobResponse. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this GitBlobResponse. + + + :param url: The url of this GitBlobResponse. # 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(GitBlobResponse, 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, GitBlobResponse): + 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/giteapython/models/git_entry.py b/giteapython/models/git_entry.py new file mode 100644 index 0000000..bfe7b29 --- /dev/null +++ b/giteapython/models/git_entry.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 GitEntry(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 = { + 'mode': 'str', + 'path': 'str', + 'sha': 'str', + 'size': 'int', + 'type': 'str', + 'url': 'str' + } + + attribute_map = { + 'mode': 'mode', + 'path': 'path', + 'sha': 'sha', + 'size': 'size', + 'type': 'type', + 'url': 'url' + } + + 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 + self._path = None + self._sha = None + self._size = None + self._type = None + self._url = None + self.discriminator = None + + if mode is not None: + self.mode = mode + if path is not None: + self.path = path + if sha is not None: + self.sha = sha + if size is not None: + self.size = size + if type is not None: + self.type = type + if url is not None: + self.url = url + + @property + def mode(self): + """Gets the mode of this GitEntry. # noqa: E501 + + + :return: The mode of this GitEntry. # noqa: E501 + :rtype: str + """ + return self._mode + + @mode.setter + def mode(self, mode): + """Sets the mode of this GitEntry. + + + :param mode: The mode of this GitEntry. # noqa: E501 + :type: str + """ + + self._mode = mode + + @property + def path(self): + """Gets the path of this GitEntry. # noqa: E501 + + + :return: The path of this GitEntry. # noqa: E501 + :rtype: str + """ + return self._path + + @path.setter + def path(self, path): + """Sets the path of this GitEntry. + + + :param path: The path of this GitEntry. # noqa: E501 + :type: str + """ + + self._path = path + + @property + def sha(self): + """Gets the sha of this GitEntry. # noqa: E501 + + + :return: The sha of this GitEntry. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this GitEntry. + + + :param sha: The sha of this GitEntry. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def size(self): + """Gets the size of this GitEntry. # noqa: E501 + + + :return: The size of this GitEntry. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this GitEntry. + + + :param size: The size of this GitEntry. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def type(self): + """Gets the type of this GitEntry. # noqa: E501 + + + :return: The type of this GitEntry. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this GitEntry. + + + :param type: The type of this GitEntry. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def url(self): + """Gets the url of this GitEntry. # noqa: E501 + + + :return: The url of this GitEntry. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this GitEntry. + + + :param url: The url of this GitEntry. # 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(GitEntry, 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, GitEntry): + 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/giteapython/models/git_hook.py b/giteapython/models/git_hook.py new file mode 100644 index 0000000..26bccbf --- /dev/null +++ b/giteapython/models/git_hook.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 GitHook(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', + 'is_active': 'bool', + 'name': 'str' + } + + attribute_map = { + 'content': 'content', + 'is_active': 'is_active', + 'name': 'name' + } + + def __init__(self, content=None, is_active=None, name=None): # noqa: E501 + """GitHook - a model defined in Swagger""" # noqa: E501 + + self._content = None + self._is_active = None + self._name = None + self.discriminator = None + + if content is not None: + self.content = content + if is_active is not None: + self.is_active = is_active + if name is not None: + self.name = name + + @property + def content(self): + """Gets the content of this GitHook. # noqa: E501 + + + :return: The content of this GitHook. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this GitHook. + + + :param content: The content of this GitHook. # noqa: E501 + :type: str + """ + + self._content = content + + @property + def is_active(self): + """Gets the is_active of this GitHook. # noqa: E501 + + + :return: The is_active of this GitHook. # noqa: E501 + :rtype: bool + """ + return self._is_active + + @is_active.setter + def is_active(self, is_active): + """Sets the is_active of this GitHook. + + + :param is_active: The is_active of this GitHook. # noqa: E501 + :type: bool + """ + + self._is_active = is_active + + @property + def name(self): + """Gets the name of this GitHook. # noqa: E501 + + + :return: The name of this GitHook. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this GitHook. + + + :param name: The name of this GitHook. # noqa: E501 + :type: str + """ + + self._name = name + + 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(GitHook, 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, GitHook): + 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/giteapython/models/git_object.py b/giteapython/models/git_object.py new file mode 100644 index 0000000..58d3db3 --- /dev/null +++ b/giteapython/models/git_object.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 GitObject(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 = { + 'sha': 'str', + 'type': 'str', + 'url': 'str' + } + + attribute_map = { + 'sha': 'sha', + 'type': 'type', + 'url': 'url' + } + + def __init__(self, sha=None, type=None, url=None): # noqa: E501 + """GitObject - a model defined in Swagger""" # noqa: E501 + + self._sha = None + self._type = None + self._url = None + self.discriminator = None + + if sha is not None: + self.sha = sha + if type is not None: + self.type = type + if url is not None: + self.url = url + + @property + def sha(self): + """Gets the sha of this GitObject. # noqa: E501 + + + :return: The sha of this GitObject. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this GitObject. + + + :param sha: The sha of this GitObject. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def type(self): + """Gets the type of this GitObject. # noqa: E501 + + + :return: The type of this GitObject. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this GitObject. + + + :param type: The type of this GitObject. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def url(self): + """Gets the url of this GitObject. # noqa: E501 + + + :return: The url of this GitObject. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this GitObject. + + + :param url: The url of this GitObject. # 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(GitObject, 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, GitObject): + 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/giteapython/models/git_tree_response.py b/giteapython/models/git_tree_response.py new file mode 100644 index 0000000..1f0231d --- /dev/null +++ b/giteapython/models/git_tree_response.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 GitTreeResponse(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 = { + 'page': 'int', + 'sha': 'str', + 'total_count': 'int', + 'tree': 'list[GitEntry]', + 'truncated': 'bool', + 'url': 'str' + } + + attribute_map = { + 'page': 'page', + 'sha': 'sha', + 'total_count': 'total_count', + 'tree': 'tree', + 'truncated': 'truncated', + 'url': 'url' + } + + def __init__(self, page=None, sha=None, total_count=None, tree=None, truncated=None, url=None): # noqa: E501 + """GitTreeResponse - a model defined in Swagger""" # noqa: E501 + + self._page = None + self._sha = None + self._total_count = None + self._tree = None + self._truncated = None + self._url = None + self.discriminator = None + + if page is not None: + self.page = page + if sha is not None: + self.sha = sha + if total_count is not None: + self.total_count = total_count + if tree is not None: + self.tree = tree + if truncated is not None: + self.truncated = truncated + if url is not None: + self.url = url + + @property + def page(self): + """Gets the page of this GitTreeResponse. # noqa: E501 + + + :return: The page of this GitTreeResponse. # noqa: E501 + :rtype: int + """ + return self._page + + @page.setter + def page(self, page): + """Sets the page of this GitTreeResponse. + + + :param page: The page of this GitTreeResponse. # noqa: E501 + :type: int + """ + + self._page = page + + @property + def sha(self): + """Gets the sha of this GitTreeResponse. # noqa: E501 + + + :return: The sha of this GitTreeResponse. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this GitTreeResponse. + + + :param sha: The sha of this GitTreeResponse. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def total_count(self): + """Gets the total_count of this GitTreeResponse. # noqa: E501 + + + :return: The total_count of this GitTreeResponse. # noqa: E501 + :rtype: int + """ + return self._total_count + + @total_count.setter + def total_count(self, total_count): + """Sets the total_count of this GitTreeResponse. + + + :param total_count: The total_count of this GitTreeResponse. # noqa: E501 + :type: int + """ + + self._total_count = total_count + + @property + def tree(self): + """Gets the tree of this GitTreeResponse. # noqa: E501 + + + :return: The tree of this GitTreeResponse. # noqa: E501 + :rtype: list[GitEntry] + """ + return self._tree + + @tree.setter + def tree(self, tree): + """Sets the tree of this GitTreeResponse. + + + :param tree: The tree of this GitTreeResponse. # noqa: E501 + :type: list[GitEntry] + """ + + self._tree = tree + + @property + def truncated(self): + """Gets the truncated of this GitTreeResponse. # noqa: E501 + + + :return: The truncated of this GitTreeResponse. # noqa: E501 + :rtype: bool + """ + return self._truncated + + @truncated.setter + def truncated(self, truncated): + """Sets the truncated of this GitTreeResponse. + + + :param truncated: The truncated of this GitTreeResponse. # noqa: E501 + :type: bool + """ + + self._truncated = truncated + + @property + def url(self): + """Gets the url of this GitTreeResponse. # noqa: E501 + + + :return: The url of this GitTreeResponse. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this GitTreeResponse. + + + :param url: The url of this GitTreeResponse. # 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(GitTreeResponse, 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, GitTreeResponse): + 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/giteapython/models/gpg_key.py b/giteapython/models/gpg_key.py new file mode 100644 index 0000000..04232a6 --- /dev/null +++ b/giteapython/models/gpg_key.py @@ -0,0 +1,401 @@ +# 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 GPGKey(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 = { + 'can_certify': 'bool', + 'can_encrypt_comms': 'bool', + 'can_encrypt_storage': 'bool', + 'can_sign': 'bool', + 'created_at': 'datetime', + 'emails': 'list[GPGKeyEmail]', + 'expires_at': 'datetime', + 'id': 'int', + 'key_id': 'str', + 'primary_key_id': 'str', + 'public_key': 'str', + 'subkeys': 'list[GPGKey]' + } + + attribute_map = { + 'can_certify': 'can_certify', + 'can_encrypt_comms': 'can_encrypt_comms', + 'can_encrypt_storage': 'can_encrypt_storage', + 'can_sign': 'can_sign', + 'created_at': 'created_at', + 'emails': 'emails', + 'expires_at': 'expires_at', + 'id': 'id', + 'key_id': 'key_id', + 'primary_key_id': 'primary_key_id', + 'public_key': 'public_key', + 'subkeys': 'subkeys' + } + + def __init__(self, can_certify=None, can_encrypt_comms=None, can_encrypt_storage=None, can_sign=None, created_at=None, emails=None, expires_at=None, id=None, key_id=None, primary_key_id=None, public_key=None, subkeys=None): # noqa: E501 + """GPGKey - a model defined in Swagger""" # noqa: E501 + + self._can_certify = None + self._can_encrypt_comms = None + self._can_encrypt_storage = None + self._can_sign = None + self._created_at = None + self._emails = None + self._expires_at = None + self._id = None + self._key_id = None + self._primary_key_id = None + self._public_key = None + self._subkeys = None + self.discriminator = None + + if can_certify is not None: + self.can_certify = can_certify + if can_encrypt_comms is not None: + self.can_encrypt_comms = can_encrypt_comms + if can_encrypt_storage is not None: + self.can_encrypt_storage = can_encrypt_storage + if can_sign is not None: + self.can_sign = can_sign + if created_at is not None: + self.created_at = created_at + if emails is not None: + self.emails = emails + if expires_at is not None: + self.expires_at = expires_at + if id is not None: + self.id = id + if key_id is not None: + self.key_id = key_id + if primary_key_id is not None: + self.primary_key_id = primary_key_id + if public_key is not None: + self.public_key = public_key + if subkeys is not None: + self.subkeys = subkeys + + @property + def can_certify(self): + """Gets the can_certify of this GPGKey. # noqa: E501 + + + :return: The can_certify of this GPGKey. # noqa: E501 + :rtype: bool + """ + return self._can_certify + + @can_certify.setter + def can_certify(self, can_certify): + """Sets the can_certify of this GPGKey. + + + :param can_certify: The can_certify of this GPGKey. # noqa: E501 + :type: bool + """ + + self._can_certify = can_certify + + @property + def can_encrypt_comms(self): + """Gets the can_encrypt_comms of this GPGKey. # noqa: E501 + + + :return: The can_encrypt_comms of this GPGKey. # noqa: E501 + :rtype: bool + """ + return self._can_encrypt_comms + + @can_encrypt_comms.setter + def can_encrypt_comms(self, can_encrypt_comms): + """Sets the can_encrypt_comms of this GPGKey. + + + :param can_encrypt_comms: The can_encrypt_comms of this GPGKey. # noqa: E501 + :type: bool + """ + + self._can_encrypt_comms = can_encrypt_comms + + @property + def can_encrypt_storage(self): + """Gets the can_encrypt_storage of this GPGKey. # noqa: E501 + + + :return: The can_encrypt_storage of this GPGKey. # noqa: E501 + :rtype: bool + """ + return self._can_encrypt_storage + + @can_encrypt_storage.setter + def can_encrypt_storage(self, can_encrypt_storage): + """Sets the can_encrypt_storage of this GPGKey. + + + :param can_encrypt_storage: The can_encrypt_storage of this GPGKey. # noqa: E501 + :type: bool + """ + + self._can_encrypt_storage = can_encrypt_storage + + @property + def can_sign(self): + """Gets the can_sign of this GPGKey. # noqa: E501 + + + :return: The can_sign of this GPGKey. # noqa: E501 + :rtype: bool + """ + return self._can_sign + + @can_sign.setter + def can_sign(self, can_sign): + """Sets the can_sign of this GPGKey. + + + :param can_sign: The can_sign of this GPGKey. # noqa: E501 + :type: bool + """ + + self._can_sign = can_sign + + @property + def created_at(self): + """Gets the created_at of this GPGKey. # noqa: E501 + + + :return: The created_at of this GPGKey. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this GPGKey. + + + :param created_at: The created_at of this GPGKey. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def emails(self): + """Gets the emails of this GPGKey. # noqa: E501 + + + :return: The emails of this GPGKey. # noqa: E501 + :rtype: list[GPGKeyEmail] + """ + return self._emails + + @emails.setter + def emails(self, emails): + """Sets the emails of this GPGKey. + + + :param emails: The emails of this GPGKey. # noqa: E501 + :type: list[GPGKeyEmail] + """ + + self._emails = emails + + @property + def expires_at(self): + """Gets the expires_at of this GPGKey. # noqa: E501 + + + :return: The expires_at of this GPGKey. # noqa: E501 + :rtype: datetime + """ + return self._expires_at + + @expires_at.setter + def expires_at(self, expires_at): + """Sets the expires_at of this GPGKey. + + + :param expires_at: The expires_at of this GPGKey. # noqa: E501 + :type: datetime + """ + + self._expires_at = expires_at + + @property + def id(self): + """Gets the id of this GPGKey. # noqa: E501 + + + :return: The id of this GPGKey. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this GPGKey. + + + :param id: The id of this GPGKey. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def key_id(self): + """Gets the key_id of this GPGKey. # noqa: E501 + + + :return: The key_id of this GPGKey. # noqa: E501 + :rtype: str + """ + return self._key_id + + @key_id.setter + def key_id(self, key_id): + """Sets the key_id of this GPGKey. + + + :param key_id: The key_id of this GPGKey. # noqa: E501 + :type: str + """ + + self._key_id = key_id + + @property + def primary_key_id(self): + """Gets the primary_key_id of this GPGKey. # noqa: E501 + + + :return: The primary_key_id of this GPGKey. # noqa: E501 + :rtype: str + """ + return self._primary_key_id + + @primary_key_id.setter + def primary_key_id(self, primary_key_id): + """Sets the primary_key_id of this GPGKey. + + + :param primary_key_id: The primary_key_id of this GPGKey. # noqa: E501 + :type: str + """ + + self._primary_key_id = primary_key_id + + @property + def public_key(self): + """Gets the public_key of this GPGKey. # noqa: E501 + + + :return: The public_key of this GPGKey. # noqa: E501 + :rtype: str + """ + return self._public_key + + @public_key.setter + def public_key(self, public_key): + """Sets the public_key of this GPGKey. + + + :param public_key: The public_key of this GPGKey. # noqa: E501 + :type: str + """ + + self._public_key = public_key + + @property + def subkeys(self): + """Gets the subkeys of this GPGKey. # noqa: E501 + + + :return: The subkeys of this GPGKey. # noqa: E501 + :rtype: list[GPGKey] + """ + return self._subkeys + + @subkeys.setter + def subkeys(self, subkeys): + """Sets the subkeys of this GPGKey. + + + :param subkeys: The subkeys of this GPGKey. # noqa: E501 + :type: list[GPGKey] + """ + + self._subkeys = subkeys + + 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(GPGKey, 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, GPGKey): + 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/giteapython/models/gpg_key_email.py b/giteapython/models/gpg_key_email.py new file mode 100644 index 0000000..5aadfc7 --- /dev/null +++ b/giteapython/models/gpg_key_email.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 GPGKeyEmail(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 = { + 'email': 'str', + 'verified': 'bool' + } + + attribute_map = { + 'email': 'email', + 'verified': 'verified' + } + + def __init__(self, email=None, verified=None): # noqa: E501 + """GPGKeyEmail - a model defined in Swagger""" # noqa: E501 + + self._email = None + self._verified = None + self.discriminator = None + + if email is not None: + self.email = email + if verified is not None: + self.verified = verified + + @property + def email(self): + """Gets the email of this GPGKeyEmail. # noqa: E501 + + + :return: The email of this GPGKeyEmail. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this GPGKeyEmail. + + + :param email: The email of this GPGKeyEmail. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def verified(self): + """Gets the verified of this GPGKeyEmail. # noqa: E501 + + + :return: The verified of this GPGKeyEmail. # noqa: E501 + :rtype: bool + """ + return self._verified + + @verified.setter + def verified(self, verified): + """Sets the verified of this GPGKeyEmail. + + + :param verified: The verified of this GPGKeyEmail. # noqa: E501 + :type: bool + """ + + self._verified = verified + + 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(GPGKeyEmail, 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, GPGKeyEmail): + 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/giteapython/models/hook.py b/giteapython/models/hook.py new file mode 100644 index 0000000..b3fd949 --- /dev/null +++ b/giteapython/models/hook.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 Hook(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 = { + 'active': 'bool', + 'config': 'dict(str, str)', + 'created_at': 'datetime', + 'events': 'list[str]', + 'id': 'int', + 'type': 'str', + 'updated_at': 'datetime' + } + + attribute_map = { + 'active': 'active', + 'config': 'config', + 'created_at': 'created_at', + 'events': 'events', + 'id': 'id', + 'type': 'type', + 'updated_at': 'updated_at' + } + + def __init__(self, active=None, config=None, created_at=None, events=None, id=None, type=None, updated_at=None): # noqa: E501 + """Hook - a model defined in Swagger""" # noqa: E501 + + self._active = None + self._config = None + self._created_at = None + self._events = None + self._id = None + self._type = None + self._updated_at = None + self.discriminator = None + + if active is not None: + self.active = active + if config is not None: + self.config = config + if created_at is not None: + self.created_at = created_at + if events is not None: + self.events = events + if id is not None: + self.id = id + if type is not None: + self.type = type + if updated_at is not None: + self.updated_at = updated_at + + @property + def active(self): + """Gets the active of this Hook. # noqa: E501 + + + :return: The active of this Hook. # noqa: E501 + :rtype: bool + """ + return self._active + + @active.setter + def active(self, active): + """Sets the active of this Hook. + + + :param active: The active of this Hook. # noqa: E501 + :type: bool + """ + + self._active = active + + @property + def config(self): + """Gets the config of this Hook. # noqa: E501 + + + :return: The config of this Hook. # noqa: E501 + :rtype: dict(str, str) + """ + return self._config + + @config.setter + def config(self, config): + """Sets the config of this Hook. + + + :param config: The config of this Hook. # noqa: E501 + :type: dict(str, str) + """ + + self._config = config + + @property + def created_at(self): + """Gets the created_at of this Hook. # noqa: E501 + + + :return: The created_at of this Hook. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Hook. + + + :param created_at: The created_at of this Hook. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def events(self): + """Gets the events of this Hook. # noqa: E501 + + + :return: The events of this Hook. # noqa: E501 + :rtype: list[str] + """ + return self._events + + @events.setter + def events(self, events): + """Sets the events of this Hook. + + + :param events: The events of this Hook. # noqa: E501 + :type: list[str] + """ + + self._events = events + + @property + def id(self): + """Gets the id of this Hook. # noqa: E501 + + + :return: The id of this Hook. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Hook. + + + :param id: The id of this Hook. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def type(self): + """Gets the type of this Hook. # noqa: E501 + + + :return: The type of this Hook. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this Hook. + + + :param type: The type of this Hook. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def updated_at(self): + """Gets the updated_at of this Hook. # noqa: E501 + + + :return: The updated_at of this Hook. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this Hook. + + + :param updated_at: The updated_at of this Hook. # 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(Hook, 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, Hook): + 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/giteapython/models/identity.py b/giteapython/models/identity.py new file mode 100644 index 0000000..e7ca29c --- /dev/null +++ b/giteapython/models/identity.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 Identity(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 = { + 'email': 'str', + 'name': 'str' + } + + attribute_map = { + 'email': 'email', + 'name': 'name' + } + + def __init__(self, email=None, name=None): # noqa: E501 + """Identity - a model defined in Swagger""" # noqa: E501 + + self._email = None + self._name = None + self.discriminator = None + + if email is not None: + self.email = email + if name is not None: + self.name = name + + @property + def email(self): + """Gets the email of this Identity. # noqa: E501 + + + :return: The email of this Identity. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this Identity. + + + :param email: The email of this Identity. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def name(self): + """Gets the name of this Identity. # noqa: E501 + + + :return: The name of this Identity. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Identity. + + + :param name: The name of this Identity. # noqa: E501 + :type: str + """ + + self._name = name + + 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(Identity, 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, Identity): + 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/giteapython/models/inline_response200.py b/giteapython/models/inline_response200.py new file mode 100644 index 0000000..883ac22 --- /dev/null +++ b/giteapython/models/inline_response200.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 InlineResponse200(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 = { + 'data': 'list[Team]', + 'ok': 'bool' + } + + attribute_map = { + 'data': 'data', + 'ok': 'ok' + } + + def __init__(self, data=None, ok=None): # noqa: E501 + """InlineResponse200 - a model defined in Swagger""" # noqa: E501 + + self._data = None + self._ok = None + self.discriminator = None + + if data is not None: + self.data = data + if ok is not None: + self.ok = ok + + @property + def data(self): + """Gets the data of this InlineResponse200. # noqa: E501 + + + :return: The data of this InlineResponse200. # noqa: E501 + :rtype: list[Team] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this InlineResponse200. + + + :param data: The data of this InlineResponse200. # noqa: E501 + :type: list[Team] + """ + + self._data = data + + @property + def ok(self): + """Gets the ok of this InlineResponse200. # noqa: E501 + + + :return: The ok of this InlineResponse200. # noqa: E501 + :rtype: bool + """ + return self._ok + + @ok.setter + def ok(self, ok): + """Sets the ok of this InlineResponse200. + + + :param ok: The ok of this InlineResponse200. # noqa: E501 + :type: bool + """ + + self._ok = ok + + 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(InlineResponse200, 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, InlineResponse200): + 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/giteapython/models/inline_response2001.py b/giteapython/models/inline_response2001.py new file mode 100644 index 0000000..32456a7 --- /dev/null +++ b/giteapython/models/inline_response2001.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 InlineResponse2001(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 = { + 'data': 'list[User]', + 'ok': 'bool' + } + + attribute_map = { + 'data': 'data', + 'ok': 'ok' + } + + def __init__(self, data=None, ok=None): # noqa: E501 + """InlineResponse2001 - a model defined in Swagger""" # noqa: E501 + + self._data = None + self._ok = None + self.discriminator = None + + if data is not None: + self.data = data + if ok is not None: + self.ok = ok + + @property + def data(self): + """Gets the data of this InlineResponse2001. # noqa: E501 + + + :return: The data of this InlineResponse2001. # noqa: E501 + :rtype: list[User] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this InlineResponse2001. + + + :param data: The data of this InlineResponse2001. # noqa: E501 + :type: list[User] + """ + + self._data = data + + @property + def ok(self): + """Gets the ok of this InlineResponse2001. # noqa: E501 + + + :return: The ok of this InlineResponse2001. # noqa: E501 + :rtype: bool + """ + return self._ok + + @ok.setter + def ok(self, ok): + """Sets the ok of this InlineResponse2001. + + + :param ok: The ok of this InlineResponse2001. # noqa: E501 + :type: bool + """ + + self._ok = ok + + 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(InlineResponse2001, 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, InlineResponse2001): + 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/giteapython/models/internal_tracker.py b/giteapython/models/internal_tracker.py new file mode 100644 index 0000000..bac07ea --- /dev/null +++ b/giteapython/models/internal_tracker.py @@ -0,0 +1,173 @@ +# 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 InternalTracker(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 = { + 'allow_only_contributors_to_track_time': 'bool', + 'enable_issue_dependencies': 'bool', + 'enable_time_tracker': 'bool' + } + + attribute_map = { + 'allow_only_contributors_to_track_time': 'allow_only_contributors_to_track_time', + 'enable_issue_dependencies': 'enable_issue_dependencies', + 'enable_time_tracker': 'enable_time_tracker' + } + + def __init__(self, allow_only_contributors_to_track_time=None, enable_issue_dependencies=None, enable_time_tracker=None): # noqa: E501 + """InternalTracker - a model defined in Swagger""" # noqa: E501 + + self._allow_only_contributors_to_track_time = None + self._enable_issue_dependencies = None + self._enable_time_tracker = None + self.discriminator = None + + if allow_only_contributors_to_track_time is not None: + self.allow_only_contributors_to_track_time = allow_only_contributors_to_track_time + if enable_issue_dependencies is not None: + self.enable_issue_dependencies = enable_issue_dependencies + if enable_time_tracker is not None: + self.enable_time_tracker = enable_time_tracker + + @property + def allow_only_contributors_to_track_time(self): + """Gets the allow_only_contributors_to_track_time of this InternalTracker. # noqa: E501 + + Let only contributors track time (Built-in issue tracker) # noqa: E501 + + :return: The allow_only_contributors_to_track_time of this InternalTracker. # noqa: E501 + :rtype: bool + """ + return self._allow_only_contributors_to_track_time + + @allow_only_contributors_to_track_time.setter + def allow_only_contributors_to_track_time(self, allow_only_contributors_to_track_time): + """Sets the allow_only_contributors_to_track_time of this InternalTracker. + + Let only contributors track time (Built-in issue tracker) # noqa: E501 + + :param allow_only_contributors_to_track_time: The allow_only_contributors_to_track_time of this InternalTracker. # noqa: E501 + :type: bool + """ + + self._allow_only_contributors_to_track_time = allow_only_contributors_to_track_time + + @property + def enable_issue_dependencies(self): + """Gets the enable_issue_dependencies of this InternalTracker. # noqa: E501 + + Enable dependencies for issues and pull requests (Built-in issue tracker) # noqa: E501 + + :return: The enable_issue_dependencies of this InternalTracker. # noqa: E501 + :rtype: bool + """ + return self._enable_issue_dependencies + + @enable_issue_dependencies.setter + def enable_issue_dependencies(self, enable_issue_dependencies): + """Sets the enable_issue_dependencies of this InternalTracker. + + Enable dependencies for issues and pull requests (Built-in issue tracker) # noqa: E501 + + :param enable_issue_dependencies: The enable_issue_dependencies of this InternalTracker. # noqa: E501 + :type: bool + """ + + self._enable_issue_dependencies = enable_issue_dependencies + + @property + def enable_time_tracker(self): + """Gets the enable_time_tracker of this InternalTracker. # noqa: E501 + + Enable time tracking (Built-in issue tracker) # noqa: E501 + + :return: The enable_time_tracker of this InternalTracker. # noqa: E501 + :rtype: bool + """ + return self._enable_time_tracker + + @enable_time_tracker.setter + def enable_time_tracker(self, enable_time_tracker): + """Sets the enable_time_tracker of this InternalTracker. + + Enable time tracking (Built-in issue tracker) # noqa: E501 + + :param enable_time_tracker: The enable_time_tracker of this InternalTracker. # noqa: E501 + :type: bool + """ + + self._enable_time_tracker = enable_time_tracker + + 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(InternalTracker, 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, InternalTracker): + 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/giteapython/models/issue.py b/giteapython/models/issue.py new file mode 100644 index 0000000..33ccdd0 --- /dev/null +++ b/giteapython/models/issue.py @@ -0,0 +1,635 @@ +# 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 Issue(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 = { + 'assignee': 'User', + 'assignees': 'list[User]', + 'body': 'str', + 'closed_at': 'datetime', + 'comments': 'int', + 'created_at': 'datetime', + 'due_date': 'datetime', + 'html_url': 'str', + 'id': 'int', + 'labels': 'list[Label]', + 'milestone': 'Milestone', + 'number': 'int', + 'original_author': 'str', + 'original_author_id': 'int', + 'pull_request': 'PullRequestMeta', + 'repository': 'RepositoryMeta', + 'state': 'StateType', + 'title': 'str', + 'updated_at': 'datetime', + 'url': 'str', + 'user': 'User' + } + + attribute_map = { + 'assignee': 'assignee', + 'assignees': 'assignees', + 'body': 'body', + 'closed_at': 'closed_at', + 'comments': 'comments', + 'created_at': 'created_at', + 'due_date': 'due_date', + 'html_url': 'html_url', + 'id': 'id', + 'labels': 'labels', + 'milestone': 'milestone', + 'number': 'number', + 'original_author': 'original_author', + 'original_author_id': 'original_author_id', + 'pull_request': 'pull_request', + 'repository': 'repository', + 'state': 'state', + 'title': 'title', + 'updated_at': 'updated_at', + 'url': 'url', + 'user': 'user' + } + + 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 + self._assignees = None + self._body = None + self._closed_at = None + self._comments = None + self._created_at = None + self._due_date = None + self._html_url = None + self._id = None + self._labels = None + self._milestone = None + self._number = None + 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 + self._url = None + self._user = None + self.discriminator = None + + if assignee is not None: + self.assignee = assignee + if assignees is not None: + self.assignees = assignees + if body is not None: + self.body = body + if closed_at is not None: + self.closed_at = closed_at + if comments is not None: + self.comments = comments + if created_at is not None: + 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: + self.labels = labels + if milestone is not None: + self.milestone = milestone + if number is not None: + self.number = number + if original_author is not None: + self.original_author = original_author + if original_author_id is not None: + 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: + self.title = title + if updated_at is not None: + self.updated_at = updated_at + if url is not None: + self.url = url + if user is not None: + self.user = user + + @property + def assignee(self): + """Gets the assignee of this Issue. # noqa: E501 + + + :return: The assignee of this Issue. # noqa: E501 + :rtype: User + """ + return self._assignee + + @assignee.setter + def assignee(self, assignee): + """Sets the assignee of this Issue. + + + :param assignee: The assignee of this Issue. # noqa: E501 + :type: User + """ + + self._assignee = assignee + + @property + def assignees(self): + """Gets the assignees of this Issue. # noqa: E501 + + + :return: The assignees of this Issue. # noqa: E501 + :rtype: list[User] + """ + return self._assignees + + @assignees.setter + def assignees(self, assignees): + """Sets the assignees of this Issue. + + + :param assignees: The assignees of this Issue. # noqa: E501 + :type: list[User] + """ + + self._assignees = assignees + + @property + def body(self): + """Gets the body of this Issue. # noqa: E501 + + + :return: The body of this Issue. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this Issue. + + + :param body: The body of this Issue. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def closed_at(self): + """Gets the closed_at of this Issue. # noqa: E501 + + + :return: The closed_at of this Issue. # noqa: E501 + :rtype: datetime + """ + return self._closed_at + + @closed_at.setter + def closed_at(self, closed_at): + """Sets the closed_at of this Issue. + + + :param closed_at: The closed_at of this Issue. # noqa: E501 + :type: datetime + """ + + self._closed_at = closed_at + + @property + def comments(self): + """Gets the comments of this Issue. # noqa: E501 + + + :return: The comments of this Issue. # noqa: E501 + :rtype: int + """ + return self._comments + + @comments.setter + def comments(self, comments): + """Sets the comments of this Issue. + + + :param comments: The comments of this Issue. # noqa: E501 + :type: int + """ + + self._comments = comments + + @property + def created_at(self): + """Gets the created_at of this Issue. # noqa: E501 + + + :return: The created_at of this Issue. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Issue. + + + :param created_at: The created_at of this Issue. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def due_date(self): + """Gets the due_date of this Issue. # noqa: E501 + + + :return: The due_date of this Issue. # noqa: E501 + :rtype: datetime + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this Issue. + + + :param due_date: The due_date of this Issue. # noqa: E501 + :type: datetime + """ + + 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 + + + :return: The id of this Issue. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Issue. + + + :param id: The id of this Issue. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def labels(self): + """Gets the labels of this Issue. # noqa: E501 + + + :return: The labels of this Issue. # noqa: E501 + :rtype: list[Label] + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this Issue. + + + :param labels: The labels of this Issue. # noqa: E501 + :type: list[Label] + """ + + self._labels = labels + + @property + def milestone(self): + """Gets the milestone of this Issue. # noqa: E501 + + + :return: The milestone of this Issue. # noqa: E501 + :rtype: Milestone + """ + return self._milestone + + @milestone.setter + def milestone(self, milestone): + """Sets the milestone of this Issue. + + + :param milestone: The milestone of this Issue. # noqa: E501 + :type: Milestone + """ + + self._milestone = milestone + + @property + def number(self): + """Gets the number of this Issue. # noqa: E501 + + + :return: The number of this Issue. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this Issue. + + + :param number: The number of this Issue. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def original_author(self): + """Gets the original_author of this Issue. # noqa: E501 + + + :return: The original_author of this Issue. # noqa: E501 + :rtype: str + """ + return self._original_author + + @original_author.setter + def original_author(self, original_author): + """Sets the original_author of this Issue. + + + :param original_author: The original_author of this Issue. # noqa: E501 + :type: str + """ + + self._original_author = original_author + + @property + def original_author_id(self): + """Gets the original_author_id of this Issue. # noqa: E501 + + + :return: The original_author_id of this Issue. # noqa: E501 + :rtype: int + """ + return self._original_author_id + + @original_author_id.setter + def original_author_id(self, original_author_id): + """Sets the original_author_id of this Issue. + + + :param original_author_id: The original_author_id of this Issue. # noqa: E501 + :type: int + """ + + self._original_author_id = original_author_id + + @property + def pull_request(self): + """Gets the pull_request of this Issue. # noqa: E501 + + + :return: The pull_request of this Issue. # noqa: E501 + :rtype: PullRequestMeta + """ + return self._pull_request + + @pull_request.setter + def pull_request(self, pull_request): + """Sets the pull_request of this Issue. + + + :param pull_request: The pull_request of this Issue. # noqa: E501 + :type: PullRequestMeta + """ + + 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 + + + :return: The state of this Issue. # noqa: E501 + :rtype: StateType + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this Issue. + + + :param state: The state of this Issue. # noqa: E501 + :type: StateType + """ + + self._state = state + + @property + def title(self): + """Gets the title of this Issue. # noqa: E501 + + + :return: The title of this Issue. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this Issue. + + + :param title: The title of this Issue. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def updated_at(self): + """Gets the updated_at of this Issue. # noqa: E501 + + + :return: The updated_at of this Issue. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this Issue. + + + :param updated_at: The updated_at of this Issue. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def url(self): + """Gets the url of this Issue. # noqa: E501 + + + :return: The url of this Issue. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Issue. + + + :param url: The url of this Issue. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def user(self): + """Gets the user of this Issue. # noqa: E501 + + + :return: The user of this Issue. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this Issue. + + + :param user: The user of this Issue. # 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(Issue, 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, Issue): + 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/giteapython/models/issue_deadline.py b/giteapython/models/issue_deadline.py new file mode 100644 index 0000000..ea50ebc --- /dev/null +++ b/giteapython/models/issue_deadline.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 IssueDeadline(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 = { + 'due_date': 'datetime' + } + + attribute_map = { + 'due_date': 'due_date' + } + + def __init__(self, due_date=None): # noqa: E501 + """IssueDeadline - a model defined in Swagger""" # noqa: E501 + + self._due_date = None + self.discriminator = None + + if due_date is not None: + self.due_date = due_date + + @property + def due_date(self): + """Gets the due_date of this IssueDeadline. # noqa: E501 + + + :return: The due_date of this IssueDeadline. # noqa: E501 + :rtype: datetime + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this IssueDeadline. + + + :param due_date: The due_date of this IssueDeadline. # noqa: E501 + :type: datetime + """ + + self._due_date = due_date + + 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(IssueDeadline, 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, IssueDeadline): + 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/giteapython/models/issue_labels_option.py b/giteapython/models/issue_labels_option.py new file mode 100644 index 0000000..51c648d --- /dev/null +++ b/giteapython/models/issue_labels_option.py @@ -0,0 +1,117 @@ +# 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 IssueLabelsOption(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 = { + 'labels': 'list[int]' + } + + attribute_map = { + 'labels': 'labels' + } + + def __init__(self, labels=None): # noqa: E501 + """IssueLabelsOption - a model defined in Swagger""" # noqa: E501 + + self._labels = None + self.discriminator = None + + if labels is not None: + self.labels = labels + + @property + def labels(self): + """Gets the labels of this IssueLabelsOption. # noqa: E501 + + list of label IDs # noqa: E501 + + :return: The labels of this IssueLabelsOption. # noqa: E501 + :rtype: list[int] + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this IssueLabelsOption. + + list of label IDs # noqa: E501 + + :param labels: The labels of this IssueLabelsOption. # noqa: E501 + :type: list[int] + """ + + self._labels = labels + + 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(IssueLabelsOption, 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, IssueLabelsOption): + 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/giteapython/models/label.py b/giteapython/models/label.py new file mode 100644 index 0000000..08a08e8 --- /dev/null +++ b/giteapython/models/label.py @@ -0,0 +1,219 @@ +# 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 Label(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 = { + 'color': 'str', + 'description': 'str', + 'id': 'int', + 'name': 'str', + 'url': 'str' + } + + attribute_map = { + 'color': 'color', + 'description': 'description', + 'id': 'id', + 'name': 'name', + 'url': 'url' + } + + def __init__(self, color=None, description=None, id=None, name=None, url=None): # noqa: E501 + """Label - a model defined in Swagger""" # noqa: E501 + + self._color = None + self._description = None + self._id = None + self._name = None + self._url = None + self.discriminator = None + + if color is not None: + self.color = color + if description is not None: + self.description = description + if id is not None: + self.id = id + if name is not None: + self.name = name + if url is not None: + self.url = url + + @property + def color(self): + """Gets the color of this Label. # noqa: E501 + + + :return: The color of this Label. # noqa: E501 + :rtype: str + """ + return self._color + + @color.setter + def color(self, color): + """Sets the color of this Label. + + + :param color: The color of this Label. # noqa: E501 + :type: str + """ + + self._color = color + + @property + def description(self): + """Gets the description of this Label. # noqa: E501 + + + :return: The description of this Label. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Label. + + + :param description: The description of this Label. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def id(self): + """Gets the id of this Label. # noqa: E501 + + + :return: The id of this Label. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Label. + + + :param id: The id of this Label. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this Label. # noqa: E501 + + + :return: The name of this Label. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Label. + + + :param name: The name of this Label. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def url(self): + """Gets the url of this Label. # noqa: E501 + + + :return: The url of this Label. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Label. + + + :param url: The url of this Label. # 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(Label, 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, Label): + 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/giteapython/models/markdown_option.py b/giteapython/models/markdown_option.py new file mode 100644 index 0000000..1c2a57d --- /dev/null +++ b/giteapython/models/markdown_option.py @@ -0,0 +1,201 @@ +# 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 MarkdownOption(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 = { + 'context': 'str', + 'mode': 'str', + 'text': 'str', + 'wiki': 'bool' + } + + attribute_map = { + 'context': 'Context', + 'mode': 'Mode', + 'text': 'Text', + 'wiki': 'Wiki' + } + + def __init__(self, context=None, mode=None, text=None, wiki=None): # noqa: E501 + """MarkdownOption - a model defined in Swagger""" # noqa: E501 + + self._context = None + self._mode = None + self._text = None + self._wiki = None + self.discriminator = None + + if context is not None: + self.context = context + if mode is not None: + self.mode = mode + if text is not None: + self.text = text + if wiki is not None: + self.wiki = wiki + + @property + def context(self): + """Gets the context of this MarkdownOption. # noqa: E501 + + Context to render in: body # noqa: E501 + + :return: The context of this MarkdownOption. # noqa: E501 + :rtype: str + """ + return self._context + + @context.setter + def context(self, context): + """Sets the context of this MarkdownOption. + + Context to render in: body # noqa: E501 + + :param context: The context of this MarkdownOption. # noqa: E501 + :type: str + """ + + self._context = context + + @property + def mode(self): + """Gets the mode of this MarkdownOption. # noqa: E501 + + Mode to render in: body # noqa: E501 + + :return: The mode of this MarkdownOption. # noqa: E501 + :rtype: str + """ + return self._mode + + @mode.setter + def mode(self, mode): + """Sets the mode of this MarkdownOption. + + Mode to render in: body # noqa: E501 + + :param mode: The mode of this MarkdownOption. # noqa: E501 + :type: str + """ + + self._mode = mode + + @property + def text(self): + """Gets the text of this MarkdownOption. # noqa: E501 + + Text markdown to render in: body # noqa: E501 + + :return: The text of this MarkdownOption. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this MarkdownOption. + + Text markdown to render in: body # noqa: E501 + + :param text: The text of this MarkdownOption. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def wiki(self): + """Gets the wiki of this MarkdownOption. # noqa: E501 + + Is it a wiki page ? in: body # noqa: E501 + + :return: The wiki of this MarkdownOption. # noqa: E501 + :rtype: bool + """ + return self._wiki + + @wiki.setter + def wiki(self, wiki): + """Sets the wiki of this MarkdownOption. + + Is it a wiki page ? in: body # noqa: E501 + + :param wiki: The wiki of this MarkdownOption. # noqa: E501 + :type: bool + """ + + self._wiki = wiki + + 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(MarkdownOption, 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, MarkdownOption): + 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/giteapython/models/merge_pull_request_option.py b/giteapython/models/merge_pull_request_option.py new file mode 100644 index 0000000..1224708 --- /dev/null +++ b/giteapython/models/merge_pull_request_option.py @@ -0,0 +1,200 @@ +# 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 MergePullRequestOption(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 = { + 'do': 'str', + 'merge_message_field': 'str', + 'merge_title_field': 'str', + 'force_merge': 'bool' + } + + attribute_map = { + 'do': 'Do', + 'merge_message_field': 'MergeMessageField', + 'merge_title_field': 'MergeTitleField', + 'force_merge': 'force_merge' + } + + 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 + if merge_message_field is not 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): + """Gets the do of this MergePullRequestOption. # noqa: E501 + + + :return: The do of this MergePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._do + + @do.setter + def do(self, do): + """Sets the do of this MergePullRequestOption. + + + :param do: The do of this MergePullRequestOption. # noqa: E501 + :type: str + """ + if do is None: + raise ValueError("Invalid value for `do`, must not be `None`") # noqa: E501 + allowed_values = ["merge", "rebase", "rebase-merge", "squash"] # noqa: E501 + if do not in allowed_values: + raise ValueError( + "Invalid value for `do` ({0}), must be one of {1}" # noqa: E501 + .format(do, allowed_values) + ) + + self._do = do + + @property + def merge_message_field(self): + """Gets the merge_message_field of this MergePullRequestOption. # noqa: E501 + + + :return: The merge_message_field of this MergePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._merge_message_field + + @merge_message_field.setter + def merge_message_field(self, merge_message_field): + """Sets the merge_message_field of this MergePullRequestOption. + + + :param merge_message_field: The merge_message_field of this MergePullRequestOption. # noqa: E501 + :type: str + """ + + self._merge_message_field = merge_message_field + + @property + def merge_title_field(self): + """Gets the merge_title_field of this MergePullRequestOption. # noqa: E501 + + + :return: The merge_title_field of this MergePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._merge_title_field + + @merge_title_field.setter + def merge_title_field(self, merge_title_field): + """Sets the merge_title_field of this MergePullRequestOption. + + + :param merge_title_field: The merge_title_field of this MergePullRequestOption. # noqa: E501 + :type: str + """ + + 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 = {} + + 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(MergePullRequestOption, 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, MergePullRequestOption): + 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/giteapython/models/migrate_repo_form.py b/giteapython/models/migrate_repo_form.py new file mode 100644 index 0000000..59c71ca --- /dev/null +++ b/giteapython/models/migrate_repo_form.py @@ -0,0 +1,456 @@ +# 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 MigrateRepoForm(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 = { + 'auth_password': 'str', + 'auth_username': 'str', + 'clone_addr': 'str', + 'description': 'str', + 'issues': 'bool', + 'labels': 'bool', + 'milestones': 'bool', + 'mirror': 'bool', + 'private': 'bool', + 'pull_requests': 'bool', + 'releases': 'bool', + 'repo_name': 'str', + 'uid': 'int', + 'wiki': 'bool' + } + + attribute_map = { + 'auth_password': 'auth_password', + 'auth_username': 'auth_username', + 'clone_addr': 'clone_addr', + 'description': 'description', + 'issues': 'issues', + 'labels': 'labels', + 'milestones': 'milestones', + 'mirror': 'mirror', + 'private': 'private', + 'pull_requests': 'pull_requests', + 'releases': 'releases', + 'repo_name': 'repo_name', + 'uid': 'uid', + 'wiki': 'wiki' + } + + def __init__(self, auth_password=None, auth_username=None, clone_addr=None, description=None, issues=None, labels=None, milestones=None, mirror=None, private=None, pull_requests=None, releases=None, repo_name=None, uid=None, wiki=None): # noqa: E501 + """MigrateRepoForm - a model defined in Swagger""" # noqa: E501 + + self._auth_password = None + self._auth_username = None + self._clone_addr = None + self._description = None + self._issues = None + self._labels = None + self._milestones = None + self._mirror = None + self._private = None + self._pull_requests = None + self._releases = None + self._repo_name = None + self._uid = None + self._wiki = None + self.discriminator = None + + if auth_password is not None: + self.auth_password = auth_password + if auth_username is not None: + self.auth_username = auth_username + self.clone_addr = clone_addr + if description is not None: + self.description = description + if issues is not None: + self.issues = issues + if labels is not None: + self.labels = labels + if milestones is not None: + self.milestones = milestones + if mirror is not None: + self.mirror = mirror + if private is not None: + self.private = private + if pull_requests is not None: + self.pull_requests = pull_requests + if releases is not None: + self.releases = releases + self.repo_name = repo_name + self.uid = uid + if wiki is not None: + self.wiki = wiki + + @property + def auth_password(self): + """Gets the auth_password of this MigrateRepoForm. # noqa: E501 + + + :return: The auth_password of this MigrateRepoForm. # noqa: E501 + :rtype: str + """ + return self._auth_password + + @auth_password.setter + def auth_password(self, auth_password): + """Sets the auth_password of this MigrateRepoForm. + + + :param auth_password: The auth_password of this MigrateRepoForm. # noqa: E501 + :type: str + """ + + self._auth_password = auth_password + + @property + def auth_username(self): + """Gets the auth_username of this MigrateRepoForm. # noqa: E501 + + + :return: The auth_username of this MigrateRepoForm. # noqa: E501 + :rtype: str + """ + return self._auth_username + + @auth_username.setter + def auth_username(self, auth_username): + """Sets the auth_username of this MigrateRepoForm. + + + :param auth_username: The auth_username of this MigrateRepoForm. # noqa: E501 + :type: str + """ + + self._auth_username = auth_username + + @property + def clone_addr(self): + """Gets the clone_addr of this MigrateRepoForm. # noqa: E501 + + + :return: The clone_addr of this MigrateRepoForm. # noqa: E501 + :rtype: str + """ + return self._clone_addr + + @clone_addr.setter + def clone_addr(self, clone_addr): + """Sets the clone_addr of this MigrateRepoForm. + + + :param clone_addr: The clone_addr of this MigrateRepoForm. # noqa: E501 + :type: str + """ + if clone_addr is None: + raise ValueError("Invalid value for `clone_addr`, must not be `None`") # noqa: E501 + + self._clone_addr = clone_addr + + @property + def description(self): + """Gets the description of this MigrateRepoForm. # noqa: E501 + + + :return: The description of this MigrateRepoForm. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this MigrateRepoForm. + + + :param description: The description of this MigrateRepoForm. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def issues(self): + """Gets the issues of this MigrateRepoForm. # noqa: E501 + + + :return: The issues of this MigrateRepoForm. # noqa: E501 + :rtype: bool + """ + return self._issues + + @issues.setter + def issues(self, issues): + """Sets the issues of this MigrateRepoForm. + + + :param issues: The issues of this MigrateRepoForm. # noqa: E501 + :type: bool + """ + + self._issues = issues + + @property + def labels(self): + """Gets the labels of this MigrateRepoForm. # noqa: E501 + + + :return: The labels of this MigrateRepoForm. # noqa: E501 + :rtype: bool + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this MigrateRepoForm. + + + :param labels: The labels of this MigrateRepoForm. # noqa: E501 + :type: bool + """ + + self._labels = labels + + @property + def milestones(self): + """Gets the milestones of this MigrateRepoForm. # noqa: E501 + + + :return: The milestones of this MigrateRepoForm. # noqa: E501 + :rtype: bool + """ + return self._milestones + + @milestones.setter + def milestones(self, milestones): + """Sets the milestones of this MigrateRepoForm. + + + :param milestones: The milestones of this MigrateRepoForm. # noqa: E501 + :type: bool + """ + + self._milestones = milestones + + @property + def mirror(self): + """Gets the mirror of this MigrateRepoForm. # noqa: E501 + + + :return: The mirror of this MigrateRepoForm. # noqa: E501 + :rtype: bool + """ + return self._mirror + + @mirror.setter + def mirror(self, mirror): + """Sets the mirror of this MigrateRepoForm. + + + :param mirror: The mirror of this MigrateRepoForm. # noqa: E501 + :type: bool + """ + + self._mirror = mirror + + @property + def private(self): + """Gets the private of this MigrateRepoForm. # noqa: E501 + + + :return: The private of this MigrateRepoForm. # noqa: E501 + :rtype: bool + """ + return self._private + + @private.setter + def private(self, private): + """Sets the private of this MigrateRepoForm. + + + :param private: The private of this MigrateRepoForm. # noqa: E501 + :type: bool + """ + + self._private = private + + @property + def pull_requests(self): + """Gets the pull_requests of this MigrateRepoForm. # noqa: E501 + + + :return: The pull_requests of this MigrateRepoForm. # noqa: E501 + :rtype: bool + """ + return self._pull_requests + + @pull_requests.setter + def pull_requests(self, pull_requests): + """Sets the pull_requests of this MigrateRepoForm. + + + :param pull_requests: The pull_requests of this MigrateRepoForm. # noqa: E501 + :type: bool + """ + + self._pull_requests = pull_requests + + @property + def releases(self): + """Gets the releases of this MigrateRepoForm. # noqa: E501 + + + :return: The releases of this MigrateRepoForm. # noqa: E501 + :rtype: bool + """ + return self._releases + + @releases.setter + def releases(self, releases): + """Sets the releases of this MigrateRepoForm. + + + :param releases: The releases of this MigrateRepoForm. # noqa: E501 + :type: bool + """ + + self._releases = releases + + @property + def repo_name(self): + """Gets the repo_name of this MigrateRepoForm. # noqa: E501 + + + :return: The repo_name of this MigrateRepoForm. # noqa: E501 + :rtype: str + """ + return self._repo_name + + @repo_name.setter + def repo_name(self, repo_name): + """Sets the repo_name of this MigrateRepoForm. + + + :param repo_name: The repo_name of this MigrateRepoForm. # noqa: E501 + :type: str + """ + if repo_name is None: + raise ValueError("Invalid value for `repo_name`, must not be `None`") # noqa: E501 + + self._repo_name = repo_name + + @property + def uid(self): + """Gets the uid of this MigrateRepoForm. # noqa: E501 + + + :return: The uid of this MigrateRepoForm. # noqa: E501 + :rtype: int + """ + return self._uid + + @uid.setter + def uid(self, uid): + """Sets the uid of this MigrateRepoForm. + + + :param uid: The uid of this MigrateRepoForm. # noqa: E501 + :type: int + """ + if uid is None: + raise ValueError("Invalid value for `uid`, must not be `None`") # noqa: E501 + + self._uid = uid + + @property + def wiki(self): + """Gets the wiki of this MigrateRepoForm. # noqa: E501 + + + :return: The wiki of this MigrateRepoForm. # noqa: E501 + :rtype: bool + """ + return self._wiki + + @wiki.setter + def wiki(self, wiki): + """Sets the wiki of this MigrateRepoForm. + + + :param wiki: The wiki of this MigrateRepoForm. # noqa: E501 + :type: bool + """ + + self._wiki = wiki + + 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(MigrateRepoForm, 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, MigrateRepoForm): + 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/giteapython/models/milestone.py b/giteapython/models/milestone.py new file mode 100644 index 0000000..9ba483e --- /dev/null +++ b/giteapython/models/milestone.py @@ -0,0 +1,297 @@ +# 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 Milestone(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 = { + 'closed_at': 'datetime', + 'closed_issues': 'int', + 'description': 'str', + 'due_on': 'datetime', + 'id': 'int', + 'open_issues': 'int', + 'state': 'StateType', + 'title': 'str' + } + + attribute_map = { + 'closed_at': 'closed_at', + 'closed_issues': 'closed_issues', + 'description': 'description', + 'due_on': 'due_on', + 'id': 'id', + 'open_issues': 'open_issues', + 'state': 'state', + 'title': 'title' + } + + def __init__(self, closed_at=None, closed_issues=None, description=None, due_on=None, id=None, open_issues=None, state=None, title=None): # noqa: E501 + """Milestone - a model defined in Swagger""" # noqa: E501 + + self._closed_at = None + self._closed_issues = None + self._description = None + self._due_on = None + self._id = None + self._open_issues = None + self._state = None + self._title = None + self.discriminator = None + + if closed_at is not None: + self.closed_at = closed_at + if closed_issues is not None: + self.closed_issues = closed_issues + if description is not None: + self.description = description + if due_on is not None: + self.due_on = due_on + if id is not None: + self.id = id + if open_issues is not None: + self.open_issues = open_issues + if state is not None: + self.state = state + if title is not None: + self.title = title + + @property + def closed_at(self): + """Gets the closed_at of this Milestone. # noqa: E501 + + + :return: The closed_at of this Milestone. # noqa: E501 + :rtype: datetime + """ + return self._closed_at + + @closed_at.setter + def closed_at(self, closed_at): + """Sets the closed_at of this Milestone. + + + :param closed_at: The closed_at of this Milestone. # noqa: E501 + :type: datetime + """ + + self._closed_at = closed_at + + @property + def closed_issues(self): + """Gets the closed_issues of this Milestone. # noqa: E501 + + + :return: The closed_issues of this Milestone. # noqa: E501 + :rtype: int + """ + return self._closed_issues + + @closed_issues.setter + def closed_issues(self, closed_issues): + """Sets the closed_issues of this Milestone. + + + :param closed_issues: The closed_issues of this Milestone. # noqa: E501 + :type: int + """ + + self._closed_issues = closed_issues + + @property + def description(self): + """Gets the description of this Milestone. # noqa: E501 + + + :return: The description of this Milestone. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Milestone. + + + :param description: The description of this Milestone. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def due_on(self): + """Gets the due_on of this Milestone. # noqa: E501 + + + :return: The due_on of this Milestone. # noqa: E501 + :rtype: datetime + """ + return self._due_on + + @due_on.setter + def due_on(self, due_on): + """Sets the due_on of this Milestone. + + + :param due_on: The due_on of this Milestone. # noqa: E501 + :type: datetime + """ + + self._due_on = due_on + + @property + def id(self): + """Gets the id of this Milestone. # noqa: E501 + + + :return: The id of this Milestone. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Milestone. + + + :param id: The id of this Milestone. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def open_issues(self): + """Gets the open_issues of this Milestone. # noqa: E501 + + + :return: The open_issues of this Milestone. # noqa: E501 + :rtype: int + """ + return self._open_issues + + @open_issues.setter + def open_issues(self, open_issues): + """Sets the open_issues of this Milestone. + + + :param open_issues: The open_issues of this Milestone. # noqa: E501 + :type: int + """ + + self._open_issues = open_issues + + @property + def state(self): + """Gets the state of this Milestone. # noqa: E501 + + + :return: The state of this Milestone. # noqa: E501 + :rtype: StateType + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this Milestone. + + + :param state: The state of this Milestone. # noqa: E501 + :type: StateType + """ + + self._state = state + + @property + def title(self): + """Gets the title of this Milestone. # noqa: E501 + + + :return: The title of this Milestone. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this Milestone. + + + :param title: The title of this Milestone. # noqa: E501 + :type: str + """ + + self._title = title + + 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(Milestone, 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, Milestone): + 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/giteapython/models/notification_count.py b/giteapython/models/notification_count.py new file mode 100644 index 0000000..b9182b8 --- /dev/null +++ b/giteapython/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/giteapython/models/notification_subject.py b/giteapython/models/notification_subject.py new file mode 100644 index 0000000..a3337fb --- /dev/null +++ b/giteapython/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/giteapython/models/notification_thread.py b/giteapython/models/notification_thread.py new file mode 100644 index 0000000..f1142b9 --- /dev/null +++ b/giteapython/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/giteapython/models/o_auth2_application.py b/giteapython/models/o_auth2_application.py new file mode 100644 index 0000000..16461d7 --- /dev/null +++ b/giteapython/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/giteapython/models/organization.py b/giteapython/models/organization.py new file mode 100644 index 0000000..9bd7ff2 --- /dev/null +++ b/giteapython/models/organization.py @@ -0,0 +1,323 @@ +# 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 Organization(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 = { + 'avatar_url': 'str', + 'description': 'str', + 'full_name': 'str', + 'id': 'int', + 'location': 'str', + 'repo_admin_change_team_access': 'bool', + 'username': 'str', + 'visibility': 'str', + 'website': 'str' + } + + attribute_map = { + 'avatar_url': 'avatar_url', + 'description': 'description', + 'full_name': 'full_name', + 'id': 'id', + 'location': 'location', + 'repo_admin_change_team_access': 'repo_admin_change_team_access', + 'username': 'username', + 'visibility': 'visibility', + 'website': 'website' + } + + def __init__(self, avatar_url=None, description=None, full_name=None, id=None, location=None, repo_admin_change_team_access=None, username=None, visibility=None, website=None): # noqa: E501 + """Organization - a model defined in Swagger""" # noqa: E501 + + self._avatar_url = None + self._description = None + self._full_name = None + self._id = None + self._location = None + self._repo_admin_change_team_access = None + self._username = None + self._visibility = None + self._website = None + self.discriminator = None + + if avatar_url is not None: + self.avatar_url = avatar_url + if description is not None: + self.description = description + if full_name is not None: + self.full_name = full_name + if id is not None: + self.id = id + if location is not None: + self.location = location + if repo_admin_change_team_access is not None: + self.repo_admin_change_team_access = repo_admin_change_team_access + if username is not None: + self.username = username + if visibility is not None: + self.visibility = visibility + if website is not None: + self.website = website + + @property + def avatar_url(self): + """Gets the avatar_url of this Organization. # noqa: E501 + + + :return: The avatar_url of this Organization. # noqa: E501 + :rtype: str + """ + return self._avatar_url + + @avatar_url.setter + def avatar_url(self, avatar_url): + """Sets the avatar_url of this Organization. + + + :param avatar_url: The avatar_url of this Organization. # noqa: E501 + :type: str + """ + + self._avatar_url = avatar_url + + @property + def description(self): + """Gets the description of this Organization. # noqa: E501 + + + :return: The description of this Organization. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Organization. + + + :param description: The description of this Organization. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def full_name(self): + """Gets the full_name of this Organization. # noqa: E501 + + + :return: The full_name of this Organization. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this Organization. + + + :param full_name: The full_name of this Organization. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def id(self): + """Gets the id of this Organization. # noqa: E501 + + + :return: The id of this Organization. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Organization. + + + :param id: The id of this Organization. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def location(self): + """Gets the location of this Organization. # noqa: E501 + + + :return: The location of this Organization. # noqa: E501 + :rtype: str + """ + return self._location + + @location.setter + def location(self, location): + """Sets the location of this Organization. + + + :param location: The location of this Organization. # noqa: E501 + :type: str + """ + + self._location = location + + @property + def repo_admin_change_team_access(self): + """Gets the repo_admin_change_team_access of this Organization. # noqa: E501 + + + :return: The repo_admin_change_team_access of this Organization. # noqa: E501 + :rtype: bool + """ + return self._repo_admin_change_team_access + + @repo_admin_change_team_access.setter + def repo_admin_change_team_access(self, repo_admin_change_team_access): + """Sets the repo_admin_change_team_access of this Organization. + + + :param repo_admin_change_team_access: The repo_admin_change_team_access of this Organization. # noqa: E501 + :type: bool + """ + + self._repo_admin_change_team_access = repo_admin_change_team_access + + @property + def username(self): + """Gets the username of this Organization. # noqa: E501 + + + :return: The username of this Organization. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this Organization. + + + :param username: The username of this Organization. # noqa: E501 + :type: str + """ + + self._username = username + + @property + def visibility(self): + """Gets the visibility of this Organization. # noqa: E501 + + + :return: The visibility of this Organization. # noqa: E501 + :rtype: str + """ + return self._visibility + + @visibility.setter + def visibility(self, visibility): + """Sets the visibility of this Organization. + + + :param visibility: The visibility of this Organization. # noqa: E501 + :type: str + """ + + self._visibility = visibility + + @property + def website(self): + """Gets the website of this Organization. # noqa: E501 + + + :return: The website of this Organization. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this Organization. + + + :param website: The website of this Organization. # noqa: E501 + :type: str + """ + + self._website = website + + 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(Organization, 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, Organization): + 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/giteapython/models/payload_commit.py b/giteapython/models/payload_commit.py new file mode 100644 index 0000000..4d1e51c --- /dev/null +++ b/giteapython/models/payload_commit.py @@ -0,0 +1,351 @@ +# 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 PayloadCommit(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 = { + 'added': 'list[str]', + 'author': 'PayloadUser', + 'committer': 'PayloadUser', + 'id': 'str', + 'message': 'str', + 'modified': 'list[str]', + 'removed': 'list[str]', + 'timestamp': 'datetime', + 'url': 'str', + 'verification': 'PayloadCommitVerification' + } + + attribute_map = { + 'added': 'added', + 'author': 'author', + 'committer': 'committer', + 'id': 'id', + 'message': 'message', + 'modified': 'modified', + 'removed': 'removed', + 'timestamp': 'timestamp', + 'url': 'url', + 'verification': 'verification' + } + + def __init__(self, added=None, author=None, committer=None, id=None, message=None, modified=None, removed=None, timestamp=None, url=None, verification=None): # noqa: E501 + """PayloadCommit - a model defined in Swagger""" # noqa: E501 + + self._added = None + self._author = None + self._committer = None + self._id = None + self._message = None + self._modified = None + self._removed = None + self._timestamp = None + self._url = None + self._verification = None + self.discriminator = None + + if added is not None: + self.added = added + if author is not None: + self.author = author + if committer is not None: + self.committer = committer + if id is not None: + self.id = id + if message is not None: + self.message = message + if modified is not None: + self.modified = modified + if removed is not None: + self.removed = removed + if timestamp is not None: + self.timestamp = timestamp + if url is not None: + self.url = url + if verification is not None: + self.verification = verification + + @property + def added(self): + """Gets the added of this PayloadCommit. # noqa: E501 + + + :return: The added of this PayloadCommit. # noqa: E501 + :rtype: list[str] + """ + return self._added + + @added.setter + def added(self, added): + """Sets the added of this PayloadCommit. + + + :param added: The added of this PayloadCommit. # noqa: E501 + :type: list[str] + """ + + self._added = added + + @property + def author(self): + """Gets the author of this PayloadCommit. # noqa: E501 + + + :return: The author of this PayloadCommit. # noqa: E501 + :rtype: PayloadUser + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this PayloadCommit. + + + :param author: The author of this PayloadCommit. # noqa: E501 + :type: PayloadUser + """ + + self._author = author + + @property + def committer(self): + """Gets the committer of this PayloadCommit. # noqa: E501 + + + :return: The committer of this PayloadCommit. # noqa: E501 + :rtype: PayloadUser + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this PayloadCommit. + + + :param committer: The committer of this PayloadCommit. # noqa: E501 + :type: PayloadUser + """ + + self._committer = committer + + @property + def id(self): + """Gets the id of this PayloadCommit. # noqa: E501 + + sha1 hash of the commit # noqa: E501 + + :return: The id of this PayloadCommit. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PayloadCommit. + + sha1 hash of the commit # noqa: E501 + + :param id: The id of this PayloadCommit. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def message(self): + """Gets the message of this PayloadCommit. # noqa: E501 + + + :return: The message of this PayloadCommit. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this PayloadCommit. + + + :param message: The message of this PayloadCommit. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def modified(self): + """Gets the modified of this PayloadCommit. # noqa: E501 + + + :return: The modified of this PayloadCommit. # noqa: E501 + :rtype: list[str] + """ + return self._modified + + @modified.setter + def modified(self, modified): + """Sets the modified of this PayloadCommit. + + + :param modified: The modified of this PayloadCommit. # noqa: E501 + :type: list[str] + """ + + self._modified = modified + + @property + def removed(self): + """Gets the removed of this PayloadCommit. # noqa: E501 + + + :return: The removed of this PayloadCommit. # noqa: E501 + :rtype: list[str] + """ + return self._removed + + @removed.setter + def removed(self, removed): + """Sets the removed of this PayloadCommit. + + + :param removed: The removed of this PayloadCommit. # noqa: E501 + :type: list[str] + """ + + self._removed = removed + + @property + def timestamp(self): + """Gets the timestamp of this PayloadCommit. # noqa: E501 + + + :return: The timestamp of this PayloadCommit. # noqa: E501 + :rtype: datetime + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this PayloadCommit. + + + :param timestamp: The timestamp of this PayloadCommit. # noqa: E501 + :type: datetime + """ + + self._timestamp = timestamp + + @property + def url(self): + """Gets the url of this PayloadCommit. # noqa: E501 + + + :return: The url of this PayloadCommit. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this PayloadCommit. + + + :param url: The url of this PayloadCommit. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def verification(self): + """Gets the verification of this PayloadCommit. # noqa: E501 + + + :return: The verification of this PayloadCommit. # noqa: E501 + :rtype: PayloadCommitVerification + """ + return self._verification + + @verification.setter + def verification(self, verification): + """Sets the verification of this PayloadCommit. + + + :param verification: The verification of this PayloadCommit. # noqa: E501 + :type: PayloadCommitVerification + """ + + self._verification = verification + + 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(PayloadCommit, 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, PayloadCommit): + 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/giteapython/models/payload_commit_verification.py b/giteapython/models/payload_commit_verification.py new file mode 100644 index 0000000..8d39b3b --- /dev/null +++ b/giteapython/models/payload_commit_verification.py @@ -0,0 +1,219 @@ +# 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 PayloadCommitVerification(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 = { + 'payload': 'str', + 'reason': 'str', + 'signature': 'str', + 'signer': 'PayloadUser', + 'verified': 'bool' + } + + attribute_map = { + 'payload': 'payload', + 'reason': 'reason', + 'signature': 'signature', + 'signer': 'signer', + 'verified': 'verified' + } + + def __init__(self, payload=None, reason=None, signature=None, signer=None, verified=None): # noqa: E501 + """PayloadCommitVerification - a model defined in Swagger""" # noqa: E501 + + self._payload = None + self._reason = None + self._signature = None + self._signer = None + self._verified = None + self.discriminator = None + + if payload is not None: + self.payload = payload + if reason is not None: + self.reason = reason + if signature is not None: + self.signature = signature + if signer is not None: + self.signer = signer + if verified is not None: + self.verified = verified + + @property + def payload(self): + """Gets the payload of this PayloadCommitVerification. # noqa: E501 + + + :return: The payload of this PayloadCommitVerification. # noqa: E501 + :rtype: str + """ + return self._payload + + @payload.setter + def payload(self, payload): + """Sets the payload of this PayloadCommitVerification. + + + :param payload: The payload of this PayloadCommitVerification. # noqa: E501 + :type: str + """ + + self._payload = payload + + @property + def reason(self): + """Gets the reason of this PayloadCommitVerification. # noqa: E501 + + + :return: The reason of this PayloadCommitVerification. # noqa: E501 + :rtype: str + """ + return self._reason + + @reason.setter + def reason(self, reason): + """Sets the reason of this PayloadCommitVerification. + + + :param reason: The reason of this PayloadCommitVerification. # noqa: E501 + :type: str + """ + + self._reason = reason + + @property + def signature(self): + """Gets the signature of this PayloadCommitVerification. # noqa: E501 + + + :return: The signature of this PayloadCommitVerification. # noqa: E501 + :rtype: str + """ + return self._signature + + @signature.setter + def signature(self, signature): + """Sets the signature of this PayloadCommitVerification. + + + :param signature: The signature of this PayloadCommitVerification. # noqa: E501 + :type: str + """ + + self._signature = signature + + @property + def signer(self): + """Gets the signer of this PayloadCommitVerification. # noqa: E501 + + + :return: The signer of this PayloadCommitVerification. # noqa: E501 + :rtype: PayloadUser + """ + return self._signer + + @signer.setter + def signer(self, signer): + """Sets the signer of this PayloadCommitVerification. + + + :param signer: The signer of this PayloadCommitVerification. # noqa: E501 + :type: PayloadUser + """ + + self._signer = signer + + @property + def verified(self): + """Gets the verified of this PayloadCommitVerification. # noqa: E501 + + + :return: The verified of this PayloadCommitVerification. # noqa: E501 + :rtype: bool + """ + return self._verified + + @verified.setter + def verified(self, verified): + """Sets the verified of this PayloadCommitVerification. + + + :param verified: The verified of this PayloadCommitVerification. # noqa: E501 + :type: bool + """ + + self._verified = verified + + 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(PayloadCommitVerification, 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, PayloadCommitVerification): + 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/giteapython/models/payload_user.py b/giteapython/models/payload_user.py new file mode 100644 index 0000000..ca12f00 --- /dev/null +++ b/giteapython/models/payload_user.py @@ -0,0 +1,169 @@ +# 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 PayloadUser(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 = { + 'email': 'str', + 'name': 'str', + 'username': 'str' + } + + attribute_map = { + 'email': 'email', + 'name': 'name', + 'username': 'username' + } + + def __init__(self, email=None, name=None, username=None): # noqa: E501 + """PayloadUser - a model defined in Swagger""" # noqa: E501 + + self._email = None + self._name = None + self._username = None + self.discriminator = None + + if email is not None: + self.email = email + if name is not None: + self.name = name + if username is not None: + self.username = username + + @property + def email(self): + """Gets the email of this PayloadUser. # noqa: E501 + + + :return: The email of this PayloadUser. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this PayloadUser. + + + :param email: The email of this PayloadUser. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def name(self): + """Gets the name of this PayloadUser. # noqa: E501 + + Full name of the commit author # noqa: E501 + + :return: The name of this PayloadUser. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this PayloadUser. + + Full name of the commit author # noqa: E501 + + :param name: The name of this PayloadUser. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def username(self): + """Gets the username of this PayloadUser. # noqa: E501 + + + :return: The username of this PayloadUser. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this PayloadUser. + + + :param username: The username of this PayloadUser. # noqa: E501 + :type: str + """ + + self._username = username + + 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(PayloadUser, 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, PayloadUser): + 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/giteapython/models/permission.py b/giteapython/models/permission.py new file mode 100644 index 0000000..f18e560 --- /dev/null +++ b/giteapython/models/permission.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 Permission(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 = { + 'admin': 'bool', + 'pull': 'bool', + 'push': 'bool' + } + + attribute_map = { + 'admin': 'admin', + 'pull': 'pull', + 'push': 'push' + } + + def __init__(self, admin=None, pull=None, push=None): # noqa: E501 + """Permission - a model defined in Swagger""" # noqa: E501 + + self._admin = None + self._pull = None + self._push = None + self.discriminator = None + + if admin is not None: + self.admin = admin + if pull is not None: + self.pull = pull + if push is not None: + self.push = push + + @property + def admin(self): + """Gets the admin of this Permission. # noqa: E501 + + + :return: The admin of this Permission. # noqa: E501 + :rtype: bool + """ + return self._admin + + @admin.setter + def admin(self, admin): + """Sets the admin of this Permission. + + + :param admin: The admin of this Permission. # noqa: E501 + :type: bool + """ + + self._admin = admin + + @property + def pull(self): + """Gets the pull of this Permission. # noqa: E501 + + + :return: The pull of this Permission. # noqa: E501 + :rtype: bool + """ + return self._pull + + @pull.setter + def pull(self, pull): + """Sets the pull of this Permission. + + + :param pull: The pull of this Permission. # noqa: E501 + :type: bool + """ + + self._pull = pull + + @property + def push(self): + """Gets the push of this Permission. # noqa: E501 + + + :return: The push of this Permission. # noqa: E501 + :rtype: bool + """ + return self._push + + @push.setter + def push(self, push): + """Sets the push of this Permission. + + + :param push: The push of this Permission. # noqa: E501 + :type: bool + """ + + self._push = push + + 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(Permission, 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, Permission): + 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/giteapython/models/pr_branch_info.py b/giteapython/models/pr_branch_info.py new file mode 100644 index 0000000..14ff273 --- /dev/null +++ b/giteapython/models/pr_branch_info.py @@ -0,0 +1,219 @@ +# 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 PRBranchInfo(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 = { + 'label': 'str', + 'ref': 'str', + 'repo': 'Repository', + 'repo_id': 'int', + 'sha': 'str' + } + + attribute_map = { + 'label': 'label', + 'ref': 'ref', + 'repo': 'repo', + 'repo_id': 'repo_id', + 'sha': 'sha' + } + + def __init__(self, label=None, ref=None, repo=None, repo_id=None, sha=None): # noqa: E501 + """PRBranchInfo - a model defined in Swagger""" # noqa: E501 + + self._label = None + self._ref = None + self._repo = None + self._repo_id = None + self._sha = None + self.discriminator = None + + if label is not None: + self.label = label + if ref is not None: + self.ref = ref + if repo is not None: + self.repo = repo + if repo_id is not None: + self.repo_id = repo_id + if sha is not None: + self.sha = sha + + @property + def label(self): + """Gets the label of this PRBranchInfo. # noqa: E501 + + + :return: The label of this PRBranchInfo. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this PRBranchInfo. + + + :param label: The label of this PRBranchInfo. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def ref(self): + """Gets the ref of this PRBranchInfo. # noqa: E501 + + + :return: The ref of this PRBranchInfo. # noqa: E501 + :rtype: str + """ + return self._ref + + @ref.setter + def ref(self, ref): + """Sets the ref of this PRBranchInfo. + + + :param ref: The ref of this PRBranchInfo. # noqa: E501 + :type: str + """ + + self._ref = ref + + @property + def repo(self): + """Gets the repo of this PRBranchInfo. # noqa: E501 + + + :return: The repo of this PRBranchInfo. # noqa: E501 + :rtype: Repository + """ + return self._repo + + @repo.setter + def repo(self, repo): + """Sets the repo of this PRBranchInfo. + + + :param repo: The repo of this PRBranchInfo. # noqa: E501 + :type: Repository + """ + + self._repo = repo + + @property + def repo_id(self): + """Gets the repo_id of this PRBranchInfo. # noqa: E501 + + + :return: The repo_id of this PRBranchInfo. # noqa: E501 + :rtype: int + """ + return self._repo_id + + @repo_id.setter + def repo_id(self, repo_id): + """Sets the repo_id of this PRBranchInfo. + + + :param repo_id: The repo_id of this PRBranchInfo. # noqa: E501 + :type: int + """ + + self._repo_id = repo_id + + @property + def sha(self): + """Gets the sha of this PRBranchInfo. # noqa: E501 + + + :return: The sha of this PRBranchInfo. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this PRBranchInfo. + + + :param sha: The sha of this PRBranchInfo. # noqa: E501 + :type: str + """ + + self._sha = sha + + 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(PRBranchInfo, 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, PRBranchInfo): + 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/giteapython/models/public_key.py b/giteapython/models/public_key.py new file mode 100644 index 0000000..fb4e0a1 --- /dev/null +++ b/giteapython/models/public_key.py @@ -0,0 +1,323 @@ +# 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 PublicKey(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_at': 'datetime', + 'fingerprint': 'str', + 'id': 'int', + 'key': 'str', + 'key_type': 'str', + 'read_only': 'bool', + 'title': 'str', + 'url': 'str', + 'user': 'User' + } + + attribute_map = { + 'created_at': 'created_at', + 'fingerprint': 'fingerprint', + 'id': 'id', + 'key': 'key', + 'key_type': 'key_type', + 'read_only': 'read_only', + 'title': 'title', + 'url': 'url', + 'user': 'user' + } + + def __init__(self, created_at=None, fingerprint=None, id=None, key=None, key_type=None, read_only=None, title=None, url=None, user=None): # noqa: E501 + """PublicKey - a model defined in Swagger""" # noqa: E501 + + self._created_at = None + self._fingerprint = None + self._id = None + self._key = None + self._key_type = None + self._read_only = None + self._title = None + self._url = None + self._user = None + self.discriminator = None + + if created_at is not None: + self.created_at = created_at + if fingerprint is not None: + self.fingerprint = fingerprint + if id is not None: + self.id = id + if key is not None: + self.key = key + if key_type is not None: + self.key_type = key_type + if read_only is not None: + self.read_only = read_only + if title is not None: + self.title = title + if url is not None: + self.url = url + if user is not None: + self.user = user + + @property + def created_at(self): + """Gets the created_at of this PublicKey. # noqa: E501 + + + :return: The created_at of this PublicKey. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this PublicKey. + + + :param created_at: The created_at of this PublicKey. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def fingerprint(self): + """Gets the fingerprint of this PublicKey. # noqa: E501 + + + :return: The fingerprint of this PublicKey. # noqa: E501 + :rtype: str + """ + return self._fingerprint + + @fingerprint.setter + def fingerprint(self, fingerprint): + """Sets the fingerprint of this PublicKey. + + + :param fingerprint: The fingerprint of this PublicKey. # noqa: E501 + :type: str + """ + + self._fingerprint = fingerprint + + @property + def id(self): + """Gets the id of this PublicKey. # noqa: E501 + + + :return: The id of this PublicKey. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PublicKey. + + + :param id: The id of this PublicKey. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def key(self): + """Gets the key of this PublicKey. # noqa: E501 + + + :return: The key of this PublicKey. # noqa: E501 + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this PublicKey. + + + :param key: The key of this PublicKey. # noqa: E501 + :type: str + """ + + self._key = key + + @property + def key_type(self): + """Gets the key_type of this PublicKey. # noqa: E501 + + + :return: The key_type of this PublicKey. # noqa: E501 + :rtype: str + """ + return self._key_type + + @key_type.setter + def key_type(self, key_type): + """Sets the key_type of this PublicKey. + + + :param key_type: The key_type of this PublicKey. # noqa: E501 + :type: str + """ + + self._key_type = key_type + + @property + def read_only(self): + """Gets the read_only of this PublicKey. # noqa: E501 + + + :return: The read_only of this PublicKey. # noqa: E501 + :rtype: bool + """ + return self._read_only + + @read_only.setter + def read_only(self, read_only): + """Sets the read_only of this PublicKey. + + + :param read_only: The read_only of this PublicKey. # noqa: E501 + :type: bool + """ + + self._read_only = read_only + + @property + def title(self): + """Gets the title of this PublicKey. # noqa: E501 + + + :return: The title of this PublicKey. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this PublicKey. + + + :param title: The title of this PublicKey. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def url(self): + """Gets the url of this PublicKey. # noqa: E501 + + + :return: The url of this PublicKey. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this PublicKey. + + + :param url: The url of this PublicKey. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def user(self): + """Gets the user of this PublicKey. # noqa: E501 + + + :return: The user of this PublicKey. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this PublicKey. + + + :param user: The user of this PublicKey. # 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(PublicKey, 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, PublicKey): + 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/giteapython/models/pull_request.py b/giteapython/models/pull_request.py new file mode 100644 index 0000000..13b458c --- /dev/null +++ b/giteapython/models/pull_request.py @@ -0,0 +1,791 @@ +# 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 PullRequest(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 = { + 'assignee': 'User', + 'assignees': 'list[User]', + 'base': 'PRBranchInfo', + 'body': 'str', + 'closed_at': 'datetime', + 'comments': 'int', + 'created_at': 'datetime', + 'diff_url': 'str', + 'due_date': 'datetime', + 'head': 'PRBranchInfo', + 'html_url': 'str', + 'id': 'int', + 'labels': 'list[Label]', + 'merge_base': 'str', + 'merge_commit_sha': 'str', + 'mergeable': 'bool', + 'merged': 'bool', + 'merged_at': 'datetime', + 'merged_by': 'User', + 'milestone': 'Milestone', + 'number': 'int', + 'patch_url': 'str', + 'state': 'StateType', + 'title': 'str', + 'updated_at': 'datetime', + 'url': 'str', + 'user': 'User' + } + + attribute_map = { + 'assignee': 'assignee', + 'assignees': 'assignees', + 'base': 'base', + 'body': 'body', + 'closed_at': 'closed_at', + 'comments': 'comments', + 'created_at': 'created_at', + 'diff_url': 'diff_url', + 'due_date': 'due_date', + 'head': 'head', + 'html_url': 'html_url', + 'id': 'id', + 'labels': 'labels', + 'merge_base': 'merge_base', + 'merge_commit_sha': 'merge_commit_sha', + 'mergeable': 'mergeable', + 'merged': 'merged', + 'merged_at': 'merged_at', + 'merged_by': 'merged_by', + 'milestone': 'milestone', + 'number': 'number', + 'patch_url': 'patch_url', + 'state': 'state', + 'title': 'title', + 'updated_at': 'updated_at', + 'url': 'url', + 'user': 'user' + } + + def __init__(self, assignee=None, assignees=None, base=None, body=None, closed_at=None, comments=None, created_at=None, diff_url=None, due_date=None, head=None, html_url=None, id=None, labels=None, merge_base=None, merge_commit_sha=None, mergeable=None, merged=None, merged_at=None, merged_by=None, milestone=None, number=None, patch_url=None, state=None, title=None, updated_at=None, url=None, user=None): # noqa: E501 + """PullRequest - a model defined in Swagger""" # noqa: E501 + + self._assignee = None + self._assignees = None + self._base = None + self._body = None + self._closed_at = None + self._comments = None + self._created_at = None + self._diff_url = None + self._due_date = None + self._head = None + self._html_url = None + self._id = None + self._labels = None + self._merge_base = None + self._merge_commit_sha = None + self._mergeable = None + self._merged = None + self._merged_at = None + self._merged_by = None + self._milestone = None + self._number = None + self._patch_url = None + self._state = None + self._title = None + self._updated_at = None + self._url = None + self._user = None + self.discriminator = None + + if assignee is not None: + self.assignee = assignee + if assignees is not None: + self.assignees = assignees + if base is not None: + self.base = base + if body is not None: + self.body = body + if closed_at is not None: + self.closed_at = closed_at + if comments is not None: + self.comments = comments + if created_at is not None: + self.created_at = created_at + if diff_url is not None: + self.diff_url = diff_url + if due_date is not None: + self.due_date = due_date + if head is not None: + self.head = head + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if labels is not None: + self.labels = labels + if merge_base is not None: + self.merge_base = merge_base + if merge_commit_sha is not None: + self.merge_commit_sha = merge_commit_sha + if mergeable is not None: + self.mergeable = mergeable + if merged is not None: + self.merged = merged + if merged_at is not None: + self.merged_at = merged_at + if merged_by is not None: + self.merged_by = merged_by + if milestone is not None: + self.milestone = milestone + if number is not None: + self.number = number + if patch_url is not None: + self.patch_url = patch_url + if state is not None: + self.state = state + if title is not None: + self.title = title + if updated_at is not None: + self.updated_at = updated_at + if url is not None: + self.url = url + if user is not None: + self.user = user + + @property + def assignee(self): + """Gets the assignee of this PullRequest. # noqa: E501 + + + :return: The assignee of this PullRequest. # noqa: E501 + :rtype: User + """ + return self._assignee + + @assignee.setter + def assignee(self, assignee): + """Sets the assignee of this PullRequest. + + + :param assignee: The assignee of this PullRequest. # noqa: E501 + :type: User + """ + + self._assignee = assignee + + @property + def assignees(self): + """Gets the assignees of this PullRequest. # noqa: E501 + + + :return: The assignees of this PullRequest. # noqa: E501 + :rtype: list[User] + """ + return self._assignees + + @assignees.setter + def assignees(self, assignees): + """Sets the assignees of this PullRequest. + + + :param assignees: The assignees of this PullRequest. # noqa: E501 + :type: list[User] + """ + + self._assignees = assignees + + @property + def base(self): + """Gets the base of this PullRequest. # noqa: E501 + + + :return: The base of this PullRequest. # noqa: E501 + :rtype: PRBranchInfo + """ + return self._base + + @base.setter + def base(self, base): + """Sets the base of this PullRequest. + + + :param base: The base of this PullRequest. # noqa: E501 + :type: PRBranchInfo + """ + + self._base = base + + @property + def body(self): + """Gets the body of this PullRequest. # noqa: E501 + + + :return: The body of this PullRequest. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this PullRequest. + + + :param body: The body of this PullRequest. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def closed_at(self): + """Gets the closed_at of this PullRequest. # noqa: E501 + + + :return: The closed_at of this PullRequest. # noqa: E501 + :rtype: datetime + """ + return self._closed_at + + @closed_at.setter + def closed_at(self, closed_at): + """Sets the closed_at of this PullRequest. + + + :param closed_at: The closed_at of this PullRequest. # noqa: E501 + :type: datetime + """ + + self._closed_at = closed_at + + @property + def comments(self): + """Gets the comments of this PullRequest. # noqa: E501 + + + :return: The comments of this PullRequest. # noqa: E501 + :rtype: int + """ + return self._comments + + @comments.setter + def comments(self, comments): + """Sets the comments of this PullRequest. + + + :param comments: The comments of this PullRequest. # noqa: E501 + :type: int + """ + + self._comments = comments + + @property + def created_at(self): + """Gets the created_at of this PullRequest. # noqa: E501 + + + :return: The created_at of this PullRequest. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this PullRequest. + + + :param created_at: The created_at of this PullRequest. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def diff_url(self): + """Gets the diff_url of this PullRequest. # noqa: E501 + + + :return: The diff_url of this PullRequest. # noqa: E501 + :rtype: str + """ + return self._diff_url + + @diff_url.setter + def diff_url(self, diff_url): + """Sets the diff_url of this PullRequest. + + + :param diff_url: The diff_url of this PullRequest. # noqa: E501 + :type: str + """ + + self._diff_url = diff_url + + @property + def due_date(self): + """Gets the due_date of this PullRequest. # noqa: E501 + + + :return: The due_date of this PullRequest. # noqa: E501 + :rtype: datetime + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this PullRequest. + + + :param due_date: The due_date of this PullRequest. # noqa: E501 + :type: datetime + """ + + self._due_date = due_date + + @property + def head(self): + """Gets the head of this PullRequest. # noqa: E501 + + + :return: The head of this PullRequest. # noqa: E501 + :rtype: PRBranchInfo + """ + return self._head + + @head.setter + def head(self, head): + """Sets the head of this PullRequest. + + + :param head: The head of this PullRequest. # noqa: E501 + :type: PRBranchInfo + """ + + self._head = head + + @property + def html_url(self): + """Gets the html_url of this PullRequest. # noqa: E501 + + + :return: The html_url of this PullRequest. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this PullRequest. + + + :param html_url: The html_url of this PullRequest. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this PullRequest. # noqa: E501 + + + :return: The id of this PullRequest. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PullRequest. + + + :param id: The id of this PullRequest. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def labels(self): + """Gets the labels of this PullRequest. # noqa: E501 + + + :return: The labels of this PullRequest. # noqa: E501 + :rtype: list[Label] + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this PullRequest. + + + :param labels: The labels of this PullRequest. # noqa: E501 + :type: list[Label] + """ + + self._labels = labels + + @property + def merge_base(self): + """Gets the merge_base of this PullRequest. # noqa: E501 + + + :return: The merge_base of this PullRequest. # noqa: E501 + :rtype: str + """ + return self._merge_base + + @merge_base.setter + def merge_base(self, merge_base): + """Sets the merge_base of this PullRequest. + + + :param merge_base: The merge_base of this PullRequest. # noqa: E501 + :type: str + """ + + self._merge_base = merge_base + + @property + def merge_commit_sha(self): + """Gets the merge_commit_sha of this PullRequest. # noqa: E501 + + + :return: The merge_commit_sha of this PullRequest. # noqa: E501 + :rtype: str + """ + return self._merge_commit_sha + + @merge_commit_sha.setter + def merge_commit_sha(self, merge_commit_sha): + """Sets the merge_commit_sha of this PullRequest. + + + :param merge_commit_sha: The merge_commit_sha of this PullRequest. # noqa: E501 + :type: str + """ + + self._merge_commit_sha = merge_commit_sha + + @property + def mergeable(self): + """Gets the mergeable of this PullRequest. # noqa: E501 + + + :return: The mergeable of this PullRequest. # noqa: E501 + :rtype: bool + """ + return self._mergeable + + @mergeable.setter + def mergeable(self, mergeable): + """Sets the mergeable of this PullRequest. + + + :param mergeable: The mergeable of this PullRequest. # noqa: E501 + :type: bool + """ + + self._mergeable = mergeable + + @property + def merged(self): + """Gets the merged of this PullRequest. # noqa: E501 + + + :return: The merged of this PullRequest. # noqa: E501 + :rtype: bool + """ + return self._merged + + @merged.setter + def merged(self, merged): + """Sets the merged of this PullRequest. + + + :param merged: The merged of this PullRequest. # noqa: E501 + :type: bool + """ + + self._merged = merged + + @property + def merged_at(self): + """Gets the merged_at of this PullRequest. # noqa: E501 + + + :return: The merged_at of this PullRequest. # noqa: E501 + :rtype: datetime + """ + return self._merged_at + + @merged_at.setter + def merged_at(self, merged_at): + """Sets the merged_at of this PullRequest. + + + :param merged_at: The merged_at of this PullRequest. # noqa: E501 + :type: datetime + """ + + self._merged_at = merged_at + + @property + def merged_by(self): + """Gets the merged_by of this PullRequest. # noqa: E501 + + + :return: The merged_by of this PullRequest. # noqa: E501 + :rtype: User + """ + return self._merged_by + + @merged_by.setter + def merged_by(self, merged_by): + """Sets the merged_by of this PullRequest. + + + :param merged_by: The merged_by of this PullRequest. # noqa: E501 + :type: User + """ + + self._merged_by = merged_by + + @property + def milestone(self): + """Gets the milestone of this PullRequest. # noqa: E501 + + + :return: The milestone of this PullRequest. # noqa: E501 + :rtype: Milestone + """ + return self._milestone + + @milestone.setter + def milestone(self, milestone): + """Sets the milestone of this PullRequest. + + + :param milestone: The milestone of this PullRequest. # noqa: E501 + :type: Milestone + """ + + self._milestone = milestone + + @property + def number(self): + """Gets the number of this PullRequest. # noqa: E501 + + + :return: The number of this PullRequest. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PullRequest. + + + :param number: The number of this PullRequest. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def patch_url(self): + """Gets the patch_url of this PullRequest. # noqa: E501 + + + :return: The patch_url of this PullRequest. # noqa: E501 + :rtype: str + """ + return self._patch_url + + @patch_url.setter + def patch_url(self, patch_url): + """Sets the patch_url of this PullRequest. + + + :param patch_url: The patch_url of this PullRequest. # noqa: E501 + :type: str + """ + + self._patch_url = patch_url + + @property + def state(self): + """Gets the state of this PullRequest. # noqa: E501 + + + :return: The state of this PullRequest. # noqa: E501 + :rtype: StateType + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this PullRequest. + + + :param state: The state of this PullRequest. # noqa: E501 + :type: StateType + """ + + self._state = state + + @property + def title(self): + """Gets the title of this PullRequest. # noqa: E501 + + + :return: The title of this PullRequest. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this PullRequest. + + + :param title: The title of this PullRequest. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def updated_at(self): + """Gets the updated_at of this PullRequest. # noqa: E501 + + + :return: The updated_at of this PullRequest. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this PullRequest. + + + :param updated_at: The updated_at of this PullRequest. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def url(self): + """Gets the url of this PullRequest. # noqa: E501 + + + :return: The url of this PullRequest. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this PullRequest. + + + :param url: The url of this PullRequest. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def user(self): + """Gets the user of this PullRequest. # noqa: E501 + + + :return: The user of this PullRequest. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this PullRequest. + + + :param user: The user of this PullRequest. # 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(PullRequest, 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, PullRequest): + 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/giteapython/models/pull_request_meta.py b/giteapython/models/pull_request_meta.py new file mode 100644 index 0000000..a96ef6d --- /dev/null +++ b/giteapython/models/pull_request_meta.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 PullRequestMeta(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 = { + 'merged': 'bool', + 'merged_at': 'datetime' + } + + attribute_map = { + 'merged': 'merged', + 'merged_at': 'merged_at' + } + + def __init__(self, merged=None, merged_at=None): # noqa: E501 + """PullRequestMeta - a model defined in Swagger""" # noqa: E501 + + self._merged = None + self._merged_at = None + self.discriminator = None + + if merged is not None: + self.merged = merged + if merged_at is not None: + self.merged_at = merged_at + + @property + def merged(self): + """Gets the merged of this PullRequestMeta. # noqa: E501 + + + :return: The merged of this PullRequestMeta. # noqa: E501 + :rtype: bool + """ + return self._merged + + @merged.setter + def merged(self, merged): + """Sets the merged of this PullRequestMeta. + + + :param merged: The merged of this PullRequestMeta. # noqa: E501 + :type: bool + """ + + self._merged = merged + + @property + def merged_at(self): + """Gets the merged_at of this PullRequestMeta. # noqa: E501 + + + :return: The merged_at of this PullRequestMeta. # noqa: E501 + :rtype: datetime + """ + return self._merged_at + + @merged_at.setter + def merged_at(self, merged_at): + """Sets the merged_at of this PullRequestMeta. + + + :param merged_at: The merged_at of this PullRequestMeta. # noqa: E501 + :type: datetime + """ + + self._merged_at = merged_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(PullRequestMeta, 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, PullRequestMeta): + 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/giteapython/models/pull_review.py b/giteapython/models/pull_review.py new file mode 100644 index 0000000..bc8c358 --- /dev/null +++ b/giteapython/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/giteapython/models/pull_review_comment.py b/giteapython/models/pull_review_comment.py new file mode 100644 index 0000000..65d84d2 --- /dev/null +++ b/giteapython/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/giteapython/models/reaction.py b/giteapython/models/reaction.py new file mode 100644 index 0000000..381361c --- /dev/null +++ b/giteapython/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/giteapython/models/reference.py b/giteapython/models/reference.py new file mode 100644 index 0000000..f34b87d --- /dev/null +++ b/giteapython/models/reference.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 Reference(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 = { + 'object': 'GitObject', + 'ref': 'str', + 'url': 'str' + } + + attribute_map = { + 'object': 'object', + 'ref': 'ref', + 'url': 'url' + } + + def __init__(self, object=None, ref=None, url=None): # noqa: E501 + """Reference - a model defined in Swagger""" # noqa: E501 + + self._object = None + self._ref = None + self._url = None + self.discriminator = None + + if object is not None: + self.object = object + if ref is not None: + self.ref = ref + if url is not None: + self.url = url + + @property + def object(self): + """Gets the object of this Reference. # noqa: E501 + + + :return: The object of this Reference. # noqa: E501 + :rtype: GitObject + """ + return self._object + + @object.setter + def object(self, object): + """Sets the object of this Reference. + + + :param object: The object of this Reference. # noqa: E501 + :type: GitObject + """ + + self._object = object + + @property + def ref(self): + """Gets the ref of this Reference. # noqa: E501 + + + :return: The ref of this Reference. # noqa: E501 + :rtype: str + """ + return self._ref + + @ref.setter + def ref(self, ref): + """Sets the ref of this Reference. + + + :param ref: The ref of this Reference. # noqa: E501 + :type: str + """ + + self._ref = ref + + @property + def url(self): + """Gets the url of this Reference. # noqa: E501 + + + :return: The url of this Reference. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Reference. + + + :param url: The url of this Reference. # 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(Reference, 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, Reference): + 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/giteapython/models/release.py b/giteapython/models/release.py new file mode 100644 index 0000000..18a7936 --- /dev/null +++ b/giteapython/models/release.py @@ -0,0 +1,479 @@ +# 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 Release(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 = { + 'assets': 'list[Attachment]', + 'author': 'User', + 'body': 'str', + 'created_at': 'datetime', + 'draft': 'bool', + 'html_url': 'str', + 'id': 'int', + 'name': 'str', + 'prerelease': 'bool', + 'published_at': 'datetime', + 'tag_name': 'str', + 'tarball_url': 'str', + 'target_commitish': 'str', + 'url': 'str', + 'zipball_url': 'str' + } + + attribute_map = { + 'assets': 'assets', + 'author': 'author', + 'body': 'body', + 'created_at': 'created_at', + 'draft': 'draft', + 'html_url': 'html_url', + 'id': 'id', + 'name': 'name', + 'prerelease': 'prerelease', + 'published_at': 'published_at', + 'tag_name': 'tag_name', + 'tarball_url': 'tarball_url', + 'target_commitish': 'target_commitish', + 'url': 'url', + 'zipball_url': 'zipball_url' + } + + 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 + self._author = None + self._body = None + self._created_at = None + self._draft = None + self._html_url = None + self._id = None + self._name = None + self._prerelease = None + self._published_at = None + self._tag_name = None + self._tarball_url = None + self._target_commitish = None + self._url = None + self._zipball_url = None + self.discriminator = None + + if assets is not None: + self.assets = assets + if author is not None: + self.author = author + if body is not None: + self.body = body + if created_at is not None: + 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: + self.name = name + if prerelease is not None: + self.prerelease = prerelease + if published_at is not None: + self.published_at = published_at + if tag_name is not None: + self.tag_name = tag_name + if tarball_url is not None: + self.tarball_url = tarball_url + if target_commitish is not None: + self.target_commitish = target_commitish + if url is not None: + self.url = url + if zipball_url is not None: + self.zipball_url = zipball_url + + @property + def assets(self): + """Gets the assets of this Release. # noqa: E501 + + + :return: The assets of this Release. # noqa: E501 + :rtype: list[Attachment] + """ + return self._assets + + @assets.setter + def assets(self, assets): + """Sets the assets of this Release. + + + :param assets: The assets of this Release. # noqa: E501 + :type: list[Attachment] + """ + + self._assets = assets + + @property + def author(self): + """Gets the author of this Release. # noqa: E501 + + + :return: The author of this Release. # noqa: E501 + :rtype: User + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this Release. + + + :param author: The author of this Release. # noqa: E501 + :type: User + """ + + self._author = author + + @property + def body(self): + """Gets the body of this Release. # noqa: E501 + + + :return: The body of this Release. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this Release. + + + :param body: The body of this Release. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def created_at(self): + """Gets the created_at of this Release. # noqa: E501 + + + :return: The created_at of this Release. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Release. + + + :param created_at: The created_at of this Release. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def draft(self): + """Gets the draft of this Release. # noqa: E501 + + + :return: The draft of this Release. # noqa: E501 + :rtype: bool + """ + return self._draft + + @draft.setter + def draft(self, draft): + """Sets the draft of this Release. + + + :param draft: The draft of this Release. # noqa: E501 + :type: bool + """ + + 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 + + + :return: The id of this Release. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Release. + + + :param id: The id of this Release. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this Release. # noqa: E501 + + + :return: The name of this Release. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Release. + + + :param name: The name of this Release. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def prerelease(self): + """Gets the prerelease of this Release. # noqa: E501 + + + :return: The prerelease of this Release. # noqa: E501 + :rtype: bool + """ + return self._prerelease + + @prerelease.setter + def prerelease(self, prerelease): + """Sets the prerelease of this Release. + + + :param prerelease: The prerelease of this Release. # noqa: E501 + :type: bool + """ + + self._prerelease = prerelease + + @property + def published_at(self): + """Gets the published_at of this Release. # noqa: E501 + + + :return: The published_at of this Release. # noqa: E501 + :rtype: datetime + """ + return self._published_at + + @published_at.setter + def published_at(self, published_at): + """Sets the published_at of this Release. + + + :param published_at: The published_at of this Release. # noqa: E501 + :type: datetime + """ + + self._published_at = published_at + + @property + def tag_name(self): + """Gets the tag_name of this Release. # noqa: E501 + + + :return: The tag_name of this Release. # noqa: E501 + :rtype: str + """ + return self._tag_name + + @tag_name.setter + def tag_name(self, tag_name): + """Sets the tag_name of this Release. + + + :param tag_name: The tag_name of this Release. # noqa: E501 + :type: str + """ + + self._tag_name = tag_name + + @property + def tarball_url(self): + """Gets the tarball_url of this Release. # noqa: E501 + + + :return: The tarball_url of this Release. # noqa: E501 + :rtype: str + """ + return self._tarball_url + + @tarball_url.setter + def tarball_url(self, tarball_url): + """Sets the tarball_url of this Release. + + + :param tarball_url: The tarball_url of this Release. # noqa: E501 + :type: str + """ + + self._tarball_url = tarball_url + + @property + def target_commitish(self): + """Gets the target_commitish of this Release. # noqa: E501 + + + :return: The target_commitish of this Release. # noqa: E501 + :rtype: str + """ + return self._target_commitish + + @target_commitish.setter + def target_commitish(self, target_commitish): + """Sets the target_commitish of this Release. + + + :param target_commitish: The target_commitish of this Release. # noqa: E501 + :type: str + """ + + self._target_commitish = target_commitish + + @property + def url(self): + """Gets the url of this Release. # noqa: E501 + + + :return: The url of this Release. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Release. + + + :param url: The url of this Release. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def zipball_url(self): + """Gets the zipball_url of this Release. # noqa: E501 + + + :return: The zipball_url of this Release. # noqa: E501 + :rtype: str + """ + return self._zipball_url + + @zipball_url.setter + def zipball_url(self, zipball_url): + """Sets the zipball_url of this Release. + + + :param zipball_url: The zipball_url of this Release. # noqa: E501 + :type: str + """ + + self._zipball_url = zipball_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(Release, 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, Release): + 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/giteapython/models/repo_commit.py b/giteapython/models/repo_commit.py new file mode 100644 index 0000000..ef87cfe --- /dev/null +++ b/giteapython/models/repo_commit.py @@ -0,0 +1,219 @@ +# 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 RepoCommit(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': 'CommitUser', + 'committer': 'CommitUser', + 'message': 'str', + 'tree': 'CommitMeta', + 'url': 'str' + } + + attribute_map = { + 'author': 'author', + 'committer': 'committer', + 'message': 'message', + 'tree': 'tree', + 'url': 'url' + } + + def __init__(self, author=None, committer=None, message=None, tree=None, url=None): # noqa: E501 + """RepoCommit - a model defined in Swagger""" # noqa: E501 + + self._author = None + self._committer = None + self._message = None + self._tree = None + self._url = None + self.discriminator = None + + if author is not None: + self.author = author + if committer is not None: + self.committer = committer + if message is not None: + self.message = message + if tree is not None: + self.tree = tree + if url is not None: + self.url = url + + @property + def author(self): + """Gets the author of this RepoCommit. # noqa: E501 + + + :return: The author of this RepoCommit. # noqa: E501 + :rtype: CommitUser + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this RepoCommit. + + + :param author: The author of this RepoCommit. # noqa: E501 + :type: CommitUser + """ + + self._author = author + + @property + def committer(self): + """Gets the committer of this RepoCommit. # noqa: E501 + + + :return: The committer of this RepoCommit. # noqa: E501 + :rtype: CommitUser + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this RepoCommit. + + + :param committer: The committer of this RepoCommit. # noqa: E501 + :type: CommitUser + """ + + self._committer = committer + + @property + def message(self): + """Gets the message of this RepoCommit. # noqa: E501 + + + :return: The message of this RepoCommit. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this RepoCommit. + + + :param message: The message of this RepoCommit. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def tree(self): + """Gets the tree of this RepoCommit. # noqa: E501 + + + :return: The tree of this RepoCommit. # noqa: E501 + :rtype: CommitMeta + """ + return self._tree + + @tree.setter + def tree(self, tree): + """Sets the tree of this RepoCommit. + + + :param tree: The tree of this RepoCommit. # noqa: E501 + :type: CommitMeta + """ + + self._tree = tree + + @property + def url(self): + """Gets the url of this RepoCommit. # noqa: E501 + + + :return: The url of this RepoCommit. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this RepoCommit. + + + :param url: The url of this RepoCommit. # 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(RepoCommit, 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, RepoCommit): + 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/giteapython/models/repo_topic_options.py b/giteapython/models/repo_topic_options.py new file mode 100644 index 0000000..c308f5a --- /dev/null +++ b/giteapython/models/repo_topic_options.py @@ -0,0 +1,117 @@ +# 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 RepoTopicOptions(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 = { + 'topics': 'list[str]' + } + + attribute_map = { + 'topics': 'topics' + } + + def __init__(self, topics=None): # noqa: E501 + """RepoTopicOptions - a model defined in Swagger""" # noqa: E501 + + self._topics = None + self.discriminator = None + + if topics is not None: + self.topics = topics + + @property + def topics(self): + """Gets the topics of this RepoTopicOptions. # noqa: E501 + + list of topic names # noqa: E501 + + :return: The topics of this RepoTopicOptions. # noqa: E501 + :rtype: list[str] + """ + return self._topics + + @topics.setter + def topics(self, topics): + """Sets the topics of this RepoTopicOptions. + + list of topic names # noqa: E501 + + :param topics: The topics of this RepoTopicOptions. # noqa: E501 + :type: list[str] + """ + + self._topics = topics + + 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(RepoTopicOptions, 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, RepoTopicOptions): + 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/giteapython/models/repository.py b/giteapython/models/repository.py new file mode 100644 index 0000000..33dddcb --- /dev/null +++ b/giteapython/models/repository.py @@ -0,0 +1,1129 @@ +# 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 Repository(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 = { + 'allow_merge_commits': 'bool', + 'allow_rebase': 'bool', + 'allow_rebase_explicit': 'bool', + 'allow_squash_merge': 'bool', + 'archived': 'bool', + 'avatar_url': 'str', + 'clone_url': 'str', + 'created_at': 'datetime', + 'default_branch': 'str', + 'description': 'str', + 'empty': 'bool', + 'external_tracker': 'ExternalTracker', + 'external_wiki': 'ExternalWiki', + 'fork': 'bool', + 'forks_count': 'int', + 'full_name': 'str', + 'has_issues': 'bool', + 'has_pull_requests': 'bool', + 'has_wiki': 'bool', + 'html_url': 'str', + 'id': 'int', + 'ignore_whitespace_conflicts': 'bool', + 'internal_tracker': 'InternalTracker', + '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' + } + + attribute_map = { + 'allow_merge_commits': 'allow_merge_commits', + 'allow_rebase': 'allow_rebase', + 'allow_rebase_explicit': 'allow_rebase_explicit', + 'allow_squash_merge': 'allow_squash_merge', + 'archived': 'archived', + 'avatar_url': 'avatar_url', + 'clone_url': 'clone_url', + 'created_at': 'created_at', + 'default_branch': 'default_branch', + 'description': 'description', + 'empty': 'empty', + 'external_tracker': 'external_tracker', + 'external_wiki': 'external_wiki', + 'fork': 'fork', + 'forks_count': 'forks_count', + 'full_name': 'full_name', + 'has_issues': 'has_issues', + 'has_pull_requests': 'has_pull_requests', + 'has_wiki': 'has_wiki', + 'html_url': 'html_url', + 'id': 'id', + 'ignore_whitespace_conflicts': 'ignore_whitespace_conflicts', + 'internal_tracker': 'internal_tracker', + '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, 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 + self._allow_rebase = None + self._allow_rebase_explicit = None + self._allow_squash_merge = None + self._archived = None + self._avatar_url = None + self._clone_url = None + self._created_at = None + self._default_branch = None + self._description = None + self._empty = None + self._external_tracker = None + self._external_wiki = None + self._fork = None + self._forks_count = None + self._full_name = None + self._has_issues = None + self._has_pull_requests = None + self._has_wiki = None + self._html_url = None + self._id = None + self._ignore_whitespace_conflicts = None + self._internal_tracker = None + 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 + self.discriminator = None + + if allow_merge_commits is not None: + self.allow_merge_commits = allow_merge_commits + if allow_rebase is not None: + self.allow_rebase = allow_rebase + if allow_rebase_explicit is not None: + self.allow_rebase_explicit = allow_rebase_explicit + if allow_squash_merge is not None: + self.allow_squash_merge = allow_squash_merge + if archived is not None: + self.archived = archived + if avatar_url is not None: + self.avatar_url = avatar_url + if clone_url is not None: + self.clone_url = clone_url + if created_at is not None: + self.created_at = created_at + if default_branch is not None: + self.default_branch = default_branch + if description is not None: + self.description = description + if empty is not None: + self.empty = empty + if external_tracker is not None: + self.external_tracker = external_tracker + if external_wiki is not None: + self.external_wiki = external_wiki + if fork is not None: + self.fork = fork + if forks_count is not None: + self.forks_count = forks_count + if full_name is not None: + self.full_name = full_name + if has_issues is not None: + self.has_issues = has_issues + if has_pull_requests is not None: + self.has_pull_requests = has_pull_requests + if has_wiki is not None: + self.has_wiki = has_wiki + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if ignore_whitespace_conflicts is not None: + self.ignore_whitespace_conflicts = ignore_whitespace_conflicts + if internal_tracker is not None: + self.internal_tracker = internal_tracker + if mirror is not None: + self.mirror = mirror + if name is not None: + 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: + self.owner = owner + if parent is not None: + self.parent = parent + if permissions is not None: + 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: + self.watchers_count = watchers_count + if website is not None: + self.website = website + + @property + def allow_merge_commits(self): + """Gets the allow_merge_commits of this Repository. # noqa: E501 + + + :return: The allow_merge_commits of this Repository. # noqa: E501 + :rtype: bool + """ + return self._allow_merge_commits + + @allow_merge_commits.setter + def allow_merge_commits(self, allow_merge_commits): + """Sets the allow_merge_commits of this Repository. + + + :param allow_merge_commits: The allow_merge_commits of this Repository. # noqa: E501 + :type: bool + """ + + self._allow_merge_commits = allow_merge_commits + + @property + def allow_rebase(self): + """Gets the allow_rebase of this Repository. # noqa: E501 + + + :return: The allow_rebase of this Repository. # noqa: E501 + :rtype: bool + """ + return self._allow_rebase + + @allow_rebase.setter + def allow_rebase(self, allow_rebase): + """Sets the allow_rebase of this Repository. + + + :param allow_rebase: The allow_rebase of this Repository. # noqa: E501 + :type: bool + """ + + self._allow_rebase = allow_rebase + + @property + def allow_rebase_explicit(self): + """Gets the allow_rebase_explicit of this Repository. # noqa: E501 + + + :return: The allow_rebase_explicit of this Repository. # noqa: E501 + :rtype: bool + """ + return self._allow_rebase_explicit + + @allow_rebase_explicit.setter + def allow_rebase_explicit(self, allow_rebase_explicit): + """Sets the allow_rebase_explicit of this Repository. + + + :param allow_rebase_explicit: The allow_rebase_explicit of this Repository. # noqa: E501 + :type: bool + """ + + self._allow_rebase_explicit = allow_rebase_explicit + + @property + def allow_squash_merge(self): + """Gets the allow_squash_merge of this Repository. # noqa: E501 + + + :return: The allow_squash_merge of this Repository. # noqa: E501 + :rtype: bool + """ + return self._allow_squash_merge + + @allow_squash_merge.setter + def allow_squash_merge(self, allow_squash_merge): + """Sets the allow_squash_merge of this Repository. + + + :param allow_squash_merge: The allow_squash_merge of this Repository. # noqa: E501 + :type: bool + """ + + self._allow_squash_merge = allow_squash_merge + + @property + def archived(self): + """Gets the archived of this Repository. # noqa: E501 + + + :return: The archived of this Repository. # noqa: E501 + :rtype: bool + """ + return self._archived + + @archived.setter + def archived(self, archived): + """Sets the archived of this Repository. + + + :param archived: The archived of this Repository. # noqa: E501 + :type: bool + """ + + self._archived = archived + + @property + def avatar_url(self): + """Gets the avatar_url of this Repository. # noqa: E501 + + + :return: The avatar_url of this Repository. # noqa: E501 + :rtype: str + """ + return self._avatar_url + + @avatar_url.setter + def avatar_url(self, avatar_url): + """Sets the avatar_url of this Repository. + + + :param avatar_url: The avatar_url of this Repository. # noqa: E501 + :type: str + """ + + self._avatar_url = avatar_url + + @property + def clone_url(self): + """Gets the clone_url of this Repository. # noqa: E501 + + + :return: The clone_url of this Repository. # noqa: E501 + :rtype: str + """ + return self._clone_url + + @clone_url.setter + def clone_url(self, clone_url): + """Sets the clone_url of this Repository. + + + :param clone_url: The clone_url of this Repository. # noqa: E501 + :type: str + """ + + self._clone_url = clone_url + + @property + def created_at(self): + """Gets the created_at of this Repository. # noqa: E501 + + + :return: The created_at of this Repository. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Repository. + + + :param created_at: The created_at of this Repository. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def default_branch(self): + """Gets the default_branch of this Repository. # noqa: E501 + + + :return: The default_branch of this Repository. # noqa: E501 + :rtype: str + """ + return self._default_branch + + @default_branch.setter + def default_branch(self, default_branch): + """Sets the default_branch of this Repository. + + + :param default_branch: The default_branch of this Repository. # noqa: E501 + :type: str + """ + + self._default_branch = default_branch + + @property + def description(self): + """Gets the description of this Repository. # noqa: E501 + + + :return: The description of this Repository. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Repository. + + + :param description: The description of this Repository. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def empty(self): + """Gets the empty of this Repository. # noqa: E501 + + + :return: The empty of this Repository. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this Repository. + + + :param empty: The empty of this Repository. # noqa: E501 + :type: bool + """ + + self._empty = empty + + @property + def external_tracker(self): + """Gets the external_tracker of this Repository. # noqa: E501 + + + :return: The external_tracker of this Repository. # noqa: E501 + :rtype: ExternalTracker + """ + return self._external_tracker + + @external_tracker.setter + def external_tracker(self, external_tracker): + """Sets the external_tracker of this Repository. + + + :param external_tracker: The external_tracker of this Repository. # noqa: E501 + :type: ExternalTracker + """ + + self._external_tracker = external_tracker + + @property + def external_wiki(self): + """Gets the external_wiki of this Repository. # noqa: E501 + + + :return: The external_wiki of this Repository. # noqa: E501 + :rtype: ExternalWiki + """ + return self._external_wiki + + @external_wiki.setter + def external_wiki(self, external_wiki): + """Sets the external_wiki of this Repository. + + + :param external_wiki: The external_wiki of this Repository. # noqa: E501 + :type: ExternalWiki + """ + + self._external_wiki = external_wiki + + @property + def fork(self): + """Gets the fork of this Repository. # noqa: E501 + + + :return: The fork of this Repository. # noqa: E501 + :rtype: bool + """ + return self._fork + + @fork.setter + def fork(self, fork): + """Sets the fork of this Repository. + + + :param fork: The fork of this Repository. # noqa: E501 + :type: bool + """ + + self._fork = fork + + @property + def forks_count(self): + """Gets the forks_count of this Repository. # noqa: E501 + + + :return: The forks_count of this Repository. # noqa: E501 + :rtype: int + """ + return self._forks_count + + @forks_count.setter + def forks_count(self, forks_count): + """Sets the forks_count of this Repository. + + + :param forks_count: The forks_count of this Repository. # noqa: E501 + :type: int + """ + + self._forks_count = forks_count + + @property + def full_name(self): + """Gets the full_name of this Repository. # noqa: E501 + + + :return: The full_name of this Repository. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this Repository. + + + :param full_name: The full_name of this Repository. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def has_issues(self): + """Gets the has_issues of this Repository. # noqa: E501 + + + :return: The has_issues of this Repository. # noqa: E501 + :rtype: bool + """ + return self._has_issues + + @has_issues.setter + def has_issues(self, has_issues): + """Sets the has_issues of this Repository. + + + :param has_issues: The has_issues of this Repository. # noqa: E501 + :type: bool + """ + + self._has_issues = has_issues + + @property + def has_pull_requests(self): + """Gets the has_pull_requests of this Repository. # noqa: E501 + + + :return: The has_pull_requests of this Repository. # noqa: E501 + :rtype: bool + """ + return self._has_pull_requests + + @has_pull_requests.setter + def has_pull_requests(self, has_pull_requests): + """Sets the has_pull_requests of this Repository. + + + :param has_pull_requests: The has_pull_requests of this Repository. # noqa: E501 + :type: bool + """ + + self._has_pull_requests = has_pull_requests + + @property + def has_wiki(self): + """Gets the has_wiki of this Repository. # noqa: E501 + + + :return: The has_wiki of this Repository. # noqa: E501 + :rtype: bool + """ + return self._has_wiki + + @has_wiki.setter + def has_wiki(self, has_wiki): + """Sets the has_wiki of this Repository. + + + :param has_wiki: The has_wiki of this Repository. # noqa: E501 + :type: bool + """ + + self._has_wiki = has_wiki + + @property + def html_url(self): + """Gets the html_url of this Repository. # noqa: E501 + + + :return: The html_url of this Repository. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this Repository. + + + :param html_url: The html_url of this Repository. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this Repository. # noqa: E501 + + + :return: The id of this Repository. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Repository. + + + :param id: The id of this Repository. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def ignore_whitespace_conflicts(self): + """Gets the ignore_whitespace_conflicts of this Repository. # noqa: E501 + + + :return: The ignore_whitespace_conflicts of this Repository. # noqa: E501 + :rtype: bool + """ + return self._ignore_whitespace_conflicts + + @ignore_whitespace_conflicts.setter + def ignore_whitespace_conflicts(self, ignore_whitespace_conflicts): + """Sets the ignore_whitespace_conflicts of this Repository. + + + :param ignore_whitespace_conflicts: The ignore_whitespace_conflicts of this Repository. # noqa: E501 + :type: bool + """ + + self._ignore_whitespace_conflicts = ignore_whitespace_conflicts + + @property + def internal_tracker(self): + """Gets the internal_tracker of this Repository. # noqa: E501 + + + :return: The internal_tracker of this Repository. # noqa: E501 + :rtype: InternalTracker + """ + return self._internal_tracker + + @internal_tracker.setter + def internal_tracker(self, internal_tracker): + """Sets the internal_tracker of this Repository. + + + :param internal_tracker: The internal_tracker of this Repository. # noqa: E501 + :type: InternalTracker + """ + + self._internal_tracker = internal_tracker + + @property + def mirror(self): + """Gets the mirror of this Repository. # noqa: E501 + + + :return: The mirror of this Repository. # noqa: E501 + :rtype: bool + """ + return self._mirror + + @mirror.setter + def mirror(self, mirror): + """Sets the mirror of this Repository. + + + :param mirror: The mirror of this Repository. # noqa: E501 + :type: bool + """ + + self._mirror = mirror + + @property + def name(self): + """Gets the name of this Repository. # noqa: E501 + + + :return: The name of this Repository. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Repository. + + + :param name: The name of this Repository. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def open_issues_count(self): + """Gets the open_issues_count of this Repository. # noqa: E501 + + + :return: The open_issues_count of this Repository. # noqa: E501 + :rtype: int + """ + return self._open_issues_count + + @open_issues_count.setter + def open_issues_count(self, open_issues_count): + """Sets the open_issues_count of this Repository. + + + :param open_issues_count: The open_issues_count of this Repository. # noqa: E501 + :type: int + """ + + 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 + + + :return: The original_url of this Repository. # noqa: E501 + :rtype: str + """ + return self._original_url + + @original_url.setter + def original_url(self, original_url): + """Sets the original_url of this Repository. + + + :param original_url: The original_url of this Repository. # noqa: E501 + :type: str + """ + + self._original_url = original_url + + @property + def owner(self): + """Gets the owner of this Repository. # noqa: E501 + + + :return: The owner of this Repository. # noqa: E501 + :rtype: User + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this Repository. + + + :param owner: The owner of this Repository. # noqa: E501 + :type: User + """ + + self._owner = owner + + @property + def parent(self): + """Gets the parent of this Repository. # noqa: E501 + + + :return: The parent of this Repository. # noqa: E501 + :rtype: Repository + """ + return self._parent + + @parent.setter + def parent(self, parent): + """Sets the parent of this Repository. + + + :param parent: The parent of this Repository. # noqa: E501 + :type: Repository + """ + + self._parent = parent + + @property + def permissions(self): + """Gets the permissions of this Repository. # noqa: E501 + + + :return: The permissions of this Repository. # noqa: E501 + :rtype: Permission + """ + return self._permissions + + @permissions.setter + def permissions(self, permissions): + """Sets the permissions of this Repository. + + + :param permissions: The permissions of this Repository. # noqa: E501 + :type: Permission + """ + + self._permissions = permissions + + @property + def private(self): + """Gets the private of this Repository. # noqa: E501 + + + :return: The private of this Repository. # noqa: E501 + :rtype: bool + """ + return self._private + + @private.setter + def private(self, private): + """Sets the private of this Repository. + + + :param private: The private of this Repository. # noqa: E501 + :type: bool + """ + + 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 + + + :return: The size of this Repository. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this Repository. + + + :param size: The size of this Repository. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def ssh_url(self): + """Gets the ssh_url of this Repository. # noqa: E501 + + + :return: The ssh_url of this Repository. # noqa: E501 + :rtype: str + """ + return self._ssh_url + + @ssh_url.setter + def ssh_url(self, ssh_url): + """Sets the ssh_url of this Repository. + + + :param ssh_url: The ssh_url of this Repository. # noqa: E501 + :type: str + """ + + self._ssh_url = ssh_url + + @property + def stars_count(self): + """Gets the stars_count of this Repository. # noqa: E501 + + + :return: The stars_count of this Repository. # noqa: E501 + :rtype: int + """ + return self._stars_count + + @stars_count.setter + def stars_count(self, stars_count): + """Sets the stars_count of this Repository. + + + :param stars_count: The stars_count of this Repository. # noqa: E501 + :type: int + """ + + 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 + + + :return: The updated_at of this Repository. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this Repository. + + + :param updated_at: The updated_at of this Repository. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def watchers_count(self): + """Gets the watchers_count of this Repository. # noqa: E501 + + + :return: The watchers_count of this Repository. # noqa: E501 + :rtype: int + """ + return self._watchers_count + + @watchers_count.setter + def watchers_count(self, watchers_count): + """Sets the watchers_count of this Repository. + + + :param watchers_count: The watchers_count of this Repository. # noqa: E501 + :type: int + """ + + self._watchers_count = watchers_count + + @property + def website(self): + """Gets the website of this Repository. # noqa: E501 + + + :return: The website of this Repository. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this Repository. + + + :param website: The website of this Repository. # noqa: E501 + :type: str + """ + + self._website = website + + 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(Repository, 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, Repository): + 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/giteapython/models/repository_meta.py b/giteapython/models/repository_meta.py new file mode 100644 index 0000000..e64efcb --- /dev/null +++ b/giteapython/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/giteapython/models/review_state_type.py b/giteapython/models/review_state_type.py new file mode 100644 index 0000000..25b57ad --- /dev/null +++ b/giteapython/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/giteapython/models/search_results.py b/giteapython/models/search_results.py new file mode 100644 index 0000000..8853e67 --- /dev/null +++ b/giteapython/models/search_results.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 SearchResults(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 = { + 'data': 'list[Repository]', + 'ok': 'bool' + } + + attribute_map = { + 'data': 'data', + 'ok': 'ok' + } + + def __init__(self, data=None, ok=None): # noqa: E501 + """SearchResults - a model defined in Swagger""" # noqa: E501 + + self._data = None + self._ok = None + self.discriminator = None + + if data is not None: + self.data = data + if ok is not None: + self.ok = ok + + @property + def data(self): + """Gets the data of this SearchResults. # noqa: E501 + + + :return: The data of this SearchResults. # noqa: E501 + :rtype: list[Repository] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this SearchResults. + + + :param data: The data of this SearchResults. # noqa: E501 + :type: list[Repository] + """ + + self._data = data + + @property + def ok(self): + """Gets the ok of this SearchResults. # noqa: E501 + + + :return: The ok of this SearchResults. # noqa: E501 + :rtype: bool + """ + return self._ok + + @ok.setter + def ok(self, ok): + """Sets the ok of this SearchResults. + + + :param ok: The ok of this SearchResults. # noqa: E501 + :type: bool + """ + + self._ok = ok + + 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(SearchResults, 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, SearchResults): + 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/giteapython/models/server_version.py b/giteapython/models/server_version.py new file mode 100644 index 0000000..65cb6b9 --- /dev/null +++ b/giteapython/models/server_version.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 ServerVersion(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 = { + 'version': 'str' + } + + attribute_map = { + 'version': 'version' + } + + def __init__(self, version=None): # noqa: E501 + """ServerVersion - a model defined in Swagger""" # noqa: E501 + + self._version = None + self.discriminator = None + + if version is not None: + self.version = version + + @property + def version(self): + """Gets the version of this ServerVersion. # noqa: E501 + + + :return: The version of this ServerVersion. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this ServerVersion. + + + :param version: The version of this ServerVersion. # noqa: E501 + :type: str + """ + + self._version = version + + 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(ServerVersion, 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, ServerVersion): + 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/giteapython/models/state_type.py b/giteapython/models/state_type.py new file mode 100644 index 0000000..27057f2 --- /dev/null +++ b/giteapython/models/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 StateType(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 + """StateType - 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(StateType, 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, StateType): + 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/giteapython/models/status.py b/giteapython/models/status.py new file mode 100644 index 0000000..e31b656 --- /dev/null +++ b/giteapython/models/status.py @@ -0,0 +1,323 @@ +# 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 Status(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 = { + 'context': 'str', + 'created_at': 'datetime', + 'creator': 'User', + 'description': 'str', + 'id': 'int', + 'status': 'StatusState', + 'target_url': 'str', + 'updated_at': 'datetime', + 'url': 'str' + } + + attribute_map = { + 'context': 'context', + 'created_at': 'created_at', + 'creator': 'creator', + 'description': 'description', + 'id': 'id', + 'status': 'status', + 'target_url': 'target_url', + 'updated_at': 'updated_at', + 'url': 'url' + } + + def __init__(self, context=None, created_at=None, creator=None, description=None, id=None, status=None, target_url=None, updated_at=None, url=None): # noqa: E501 + """Status - a model defined in Swagger""" # noqa: E501 + + self._context = None + self._created_at = None + self._creator = None + self._description = None + self._id = None + self._status = None + self._target_url = None + self._updated_at = None + self._url = None + self.discriminator = None + + if context is not None: + self.context = context + if created_at is not None: + self.created_at = created_at + if creator is not None: + self.creator = creator + if description is not None: + self.description = description + if id is not None: + self.id = id + if status is not None: + self.status = status + if target_url is not None: + self.target_url = target_url + if updated_at is not None: + self.updated_at = updated_at + if url is not None: + self.url = url + + @property + def context(self): + """Gets the context of this Status. # noqa: E501 + + + :return: The context of this Status. # noqa: E501 + :rtype: str + """ + return self._context + + @context.setter + def context(self, context): + """Sets the context of this Status. + + + :param context: The context of this Status. # noqa: E501 + :type: str + """ + + self._context = context + + @property + def created_at(self): + """Gets the created_at of this Status. # noqa: E501 + + + :return: The created_at of this Status. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Status. + + + :param created_at: The created_at of this Status. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def creator(self): + """Gets the creator of this Status. # noqa: E501 + + + :return: The creator of this Status. # noqa: E501 + :rtype: User + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this Status. + + + :param creator: The creator of this Status. # noqa: E501 + :type: User + """ + + self._creator = creator + + @property + def description(self): + """Gets the description of this Status. # noqa: E501 + + + :return: The description of this Status. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Status. + + + :param description: The description of this Status. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def id(self): + """Gets the id of this Status. # noqa: E501 + + + :return: The id of this Status. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Status. + + + :param id: The id of this Status. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def status(self): + """Gets the status of this Status. # noqa: E501 + + + :return: The status of this Status. # noqa: E501 + :rtype: StatusState + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this Status. + + + :param status: The status of this Status. # noqa: E501 + :type: StatusState + """ + + self._status = status + + @property + def target_url(self): + """Gets the target_url of this Status. # noqa: E501 + + + :return: The target_url of this Status. # noqa: E501 + :rtype: str + """ + return self._target_url + + @target_url.setter + def target_url(self, target_url): + """Sets the target_url of this Status. + + + :param target_url: The target_url of this Status. # noqa: E501 + :type: str + """ + + self._target_url = target_url + + @property + def updated_at(self): + """Gets the updated_at of this Status. # noqa: E501 + + + :return: The updated_at of this Status. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this Status. + + + :param updated_at: The updated_at of this Status. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def url(self): + """Gets the url of this Status. # noqa: E501 + + + :return: The url of this Status. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Status. + + + :param url: The url of this Status. # 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(Status, 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, Status): + 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/giteapython/models/status_state.py b/giteapython/models/status_state.py new file mode 100644 index 0000000..1d4271f --- /dev/null +++ b/giteapython/models/status_state.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 StatusState(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 + """StatusState - 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(StatusState, 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, StatusState): + 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/giteapython/models/stop_watch.py b/giteapython/models/stop_watch.py new file mode 100644 index 0000000..24349eb --- /dev/null +++ b/giteapython/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/giteapython/models/submit_pull_review_options.py b/giteapython/models/submit_pull_review_options.py new file mode 100644 index 0000000..3a51093 --- /dev/null +++ b/giteapython/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/giteapython/models/tag.py b/giteapython/models/tag.py new file mode 100644 index 0000000..86f8fb2 --- /dev/null +++ b/giteapython/models/tag.py @@ -0,0 +1,219 @@ +# 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 Tag(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 = { + 'commit': 'CommitMeta', + 'id': 'str', + 'name': 'str', + 'tarball_url': 'str', + 'zipball_url': 'str' + } + + attribute_map = { + 'commit': 'commit', + 'id': 'id', + 'name': 'name', + 'tarball_url': 'tarball_url', + 'zipball_url': 'zipball_url' + } + + def __init__(self, commit=None, id=None, name=None, tarball_url=None, zipball_url=None): # noqa: E501 + """Tag - a model defined in Swagger""" # noqa: E501 + + self._commit = None + self._id = None + self._name = None + self._tarball_url = None + self._zipball_url = None + self.discriminator = None + + if commit is not None: + self.commit = commit + if id is not None: + self.id = id + if name is not None: + self.name = name + if tarball_url is not None: + self.tarball_url = tarball_url + if zipball_url is not None: + self.zipball_url = zipball_url + + @property + def commit(self): + """Gets the commit of this Tag. # noqa: E501 + + + :return: The commit of this Tag. # noqa: E501 + :rtype: CommitMeta + """ + return self._commit + + @commit.setter + def commit(self, commit): + """Sets the commit of this Tag. + + + :param commit: The commit of this Tag. # noqa: E501 + :type: CommitMeta + """ + + self._commit = commit + + @property + def id(self): + """Gets the id of this Tag. # noqa: E501 + + + :return: The id of this Tag. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Tag. + + + :param id: The id of this Tag. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def name(self): + """Gets the name of this Tag. # noqa: E501 + + + :return: The name of this Tag. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Tag. + + + :param name: The name of this Tag. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def tarball_url(self): + """Gets the tarball_url of this Tag. # noqa: E501 + + + :return: The tarball_url of this Tag. # noqa: E501 + :rtype: str + """ + return self._tarball_url + + @tarball_url.setter + def tarball_url(self, tarball_url): + """Sets the tarball_url of this Tag. + + + :param tarball_url: The tarball_url of this Tag. # noqa: E501 + :type: str + """ + + self._tarball_url = tarball_url + + @property + def zipball_url(self): + """Gets the zipball_url of this Tag. # noqa: E501 + + + :return: The zipball_url of this Tag. # noqa: E501 + :rtype: str + """ + return self._zipball_url + + @zipball_url.setter + def zipball_url(self, zipball_url): + """Sets the zipball_url of this Tag. + + + :param zipball_url: The zipball_url of this Tag. # noqa: E501 + :type: str + """ + + self._zipball_url = zipball_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(Tag, 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, Tag): + 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/giteapython/models/team.py b/giteapython/models/team.py new file mode 100644 index 0000000..c37b176 --- /dev/null +++ b/giteapython/models/team.py @@ -0,0 +1,303 @@ +# 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 Team(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 = { + 'can_create_org_repo': 'bool', + 'description': 'str', + 'id': 'int', + 'includes_all_repositories': 'bool', + 'name': 'str', + 'organization': 'Organization', + 'permission': 'str', + 'units': 'list[str]' + } + + 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, 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: + self.organization = organization + 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 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 + + + :return: The description of this Team. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Team. + + + :param description: The description of this Team. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def id(self): + """Gets the id of this Team. # noqa: E501 + + + :return: The id of this Team. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Team. + + + :param id: The id of this Team. # noqa: E501 + :type: int + """ + + 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 + + + :return: The name of this Team. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Team. + + + :param name: The name of this Team. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def organization(self): + """Gets the organization of this Team. # noqa: E501 + + + :return: The organization of this Team. # noqa: E501 + :rtype: Organization + """ + return self._organization + + @organization.setter + def organization(self, organization): + """Sets the organization of this Team. + + + :param organization: The organization of this Team. # noqa: E501 + :type: Organization + """ + + self._organization = organization + + @property + def permission(self): + """Gets the permission of this Team. # noqa: E501 + + + :return: The permission of this Team. # noqa: E501 + :rtype: str + """ + return self._permission + + @permission.setter + def permission(self, permission): + """Sets the permission of this Team. + + + :param permission: The permission of this Team. # noqa: E501 + :type: str + """ + allowed_values = ["none", "read", "write", "admin", "owner"] # noqa: E501 + if permission not in allowed_values: + raise ValueError( + "Invalid value for `permission` ({0}), must be one of {1}" # noqa: E501 + .format(permission, allowed_values) + ) + + self._permission = permission + + @property + def units(self): + """Gets the units of this Team. # noqa: E501 + + + :return: The units of this Team. # noqa: E501 + :rtype: list[str] + """ + return self._units + + @units.setter + def units(self, units): + """Sets the units of this Team. + + + :param units: The units of this Team. # noqa: E501 + :type: list[str] + """ + + self._units = units + + 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(Team, 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, Team): + 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/giteapython/models/time_stamp.py b/giteapython/models/time_stamp.py new file mode 100644 index 0000000..c9bf21c --- /dev/null +++ b/giteapython/models/time_stamp.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 TimeStamp(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 + """TimeStamp - 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(TimeStamp, 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, TimeStamp): + 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/giteapython/models/topic_name.py b/giteapython/models/topic_name.py new file mode 100644 index 0000000..f26cc13 --- /dev/null +++ b/giteapython/models/topic_name.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 TopicName(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 = { + 'topics': 'list[str]' + } + + attribute_map = { + 'topics': 'topics' + } + + def __init__(self, topics=None): # noqa: E501 + """TopicName - a model defined in Swagger""" # noqa: E501 + + self._topics = None + self.discriminator = None + + if topics is not None: + self.topics = topics + + @property + def topics(self): + """Gets the topics of this TopicName. # noqa: E501 + + + :return: The topics of this TopicName. # noqa: E501 + :rtype: list[str] + """ + return self._topics + + @topics.setter + def topics(self, topics): + """Sets the topics of this TopicName. + + + :param topics: The topics of this TopicName. # noqa: E501 + :type: list[str] + """ + + self._topics = topics + + 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(TopicName, 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, TopicName): + 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/giteapython/models/topic_response.py b/giteapython/models/topic_response.py new file mode 100644 index 0000000..a2f9566 --- /dev/null +++ b/giteapython/models/topic_response.py @@ -0,0 +1,219 @@ +# 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 TopicResponse(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', + 'id': 'int', + 'repo_count': 'int', + 'topic_name': 'str', + 'updated': 'datetime' + } + + attribute_map = { + 'created': 'created', + 'id': 'id', + 'repo_count': 'repo_count', + 'topic_name': 'topic_name', + 'updated': 'updated' + } + + def __init__(self, created=None, id=None, repo_count=None, topic_name=None, updated=None): # noqa: E501 + """TopicResponse - a model defined in Swagger""" # noqa: E501 + + self._created = None + self._id = None + self._repo_count = None + self._topic_name = None + self._updated = None + self.discriminator = None + + if created is not None: + self.created = created + if id is not None: + self.id = id + if repo_count is not None: + self.repo_count = repo_count + if topic_name is not None: + self.topic_name = topic_name + if updated is not None: + self.updated = updated + + @property + def created(self): + """Gets the created of this TopicResponse. # noqa: E501 + + + :return: The created of this TopicResponse. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this TopicResponse. + + + :param created: The created of this TopicResponse. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def id(self): + """Gets the id of this TopicResponse. # noqa: E501 + + + :return: The id of this TopicResponse. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this TopicResponse. + + + :param id: The id of this TopicResponse. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def repo_count(self): + """Gets the repo_count of this TopicResponse. # noqa: E501 + + + :return: The repo_count of this TopicResponse. # noqa: E501 + :rtype: int + """ + return self._repo_count + + @repo_count.setter + def repo_count(self, repo_count): + """Sets the repo_count of this TopicResponse. + + + :param repo_count: The repo_count of this TopicResponse. # noqa: E501 + :type: int + """ + + self._repo_count = repo_count + + @property + def topic_name(self): + """Gets the topic_name of this TopicResponse. # noqa: E501 + + + :return: The topic_name of this TopicResponse. # noqa: E501 + :rtype: str + """ + return self._topic_name + + @topic_name.setter + def topic_name(self, topic_name): + """Sets the topic_name of this TopicResponse. + + + :param topic_name: The topic_name of this TopicResponse. # noqa: E501 + :type: str + """ + + self._topic_name = topic_name + + @property + def updated(self): + """Gets the updated of this TopicResponse. # noqa: E501 + + + :return: The updated of this TopicResponse. # noqa: E501 + :rtype: datetime + """ + return self._updated + + @updated.setter + def updated(self, updated): + """Sets the updated of this TopicResponse. + + + :param updated: The updated of this TopicResponse. # noqa: E501 + :type: datetime + """ + + self._updated = updated + + 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(TopicResponse, 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, TopicResponse): + 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/giteapython/models/tracked_time.py b/giteapython/models/tracked_time.py new file mode 100644 index 0000000..e6e4a46 --- /dev/null +++ b/giteapython/models/tracked_time.py @@ -0,0 +1,277 @@ +# 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 TrackedTime(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', + 'id': 'int', + 'issue': 'Issue', + 'issue_id': 'int', + 'time': '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_name': 'user_name' + } + + 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): + """Gets the created of this TrackedTime. # noqa: E501 + + + :return: The created of this TrackedTime. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this TrackedTime. + + + :param created: The created of this TrackedTime. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def id(self): + """Gets the id of this TrackedTime. # noqa: E501 + + + :return: The id of this TrackedTime. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this TrackedTime. + + + :param id: The id of this TrackedTime. # noqa: E501 + :type: int + """ + + 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 + """ + return self._issue_id + + @issue_id.setter + 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 + """ + + self._issue_id = issue_id + + @property + def time(self): + """Gets the time of this TrackedTime. # noqa: E501 + + Time in seconds # noqa: E501 + + :return: The time of this TrackedTime. # noqa: E501 + :rtype: int + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this TrackedTime. + + Time in seconds # noqa: E501 + + :param time: The time of this TrackedTime. # noqa: E501 + :type: int + """ + + self._time = time + + @property + 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 + """ + return self._user_id + + @user_id.setter + 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 + """ + + 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 = {} + + 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(TrackedTime, 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, TrackedTime): + 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/giteapython/models/transfer_repo_option.py b/giteapython/models/transfer_repo_option.py new file mode 100644 index 0000000..9b27728 --- /dev/null +++ b/giteapython/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/giteapython/models/update_file_options.py b/giteapython/models/update_file_options.py new file mode 100644 index 0000000..e6777e0 --- /dev/null +++ b/giteapython/models/update_file_options.py @@ -0,0 +1,337 @@ +# 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 UpdateFileOptions(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': 'Identity', + 'branch': 'str', + 'committer': 'Identity', + 'content': 'str', + 'dates': 'CommitDateOptions', + 'from_path': 'str', + 'message': 'str', + 'new_branch': 'str', + 'sha': 'str' + } + + attribute_map = { + 'author': 'author', + '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, 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 + self._sha = None + self.discriminator = None + + if author is not None: + self.author = author + if branch is not None: + self.branch = branch + 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: + self.message = message + if new_branch is not None: + self.new_branch = new_branch + self.sha = sha + + @property + def author(self): + """Gets the author of this UpdateFileOptions. # noqa: E501 + + + :return: The author of this UpdateFileOptions. # noqa: E501 + :rtype: Identity + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this UpdateFileOptions. + + + :param author: The author of this UpdateFileOptions. # noqa: E501 + :type: Identity + """ + + self._author = author + + @property + def branch(self): + """Gets the branch of this UpdateFileOptions. # noqa: E501 + + branch (optional) to base this file from. if not given, the default branch is used # noqa: E501 + + :return: The branch of this UpdateFileOptions. # noqa: E501 + :rtype: str + """ + return self._branch + + @branch.setter + def branch(self, branch): + """Sets the branch of this UpdateFileOptions. + + branch (optional) to base this file from. if not given, the default branch is used # noqa: E501 + + :param branch: The branch of this UpdateFileOptions. # noqa: E501 + :type: str + """ + + self._branch = branch + + @property + def committer(self): + """Gets the committer of this UpdateFileOptions. # noqa: E501 + + + :return: The committer of this UpdateFileOptions. # noqa: E501 + :rtype: Identity + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this UpdateFileOptions. + + + :param committer: The committer of this UpdateFileOptions. # noqa: E501 + :type: Identity + """ + + self._committer = committer + + @property + def content(self): + """Gets the content of this UpdateFileOptions. # noqa: E501 + + content must be base64 encoded # noqa: E501 + + :return: The content of this UpdateFileOptions. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this UpdateFileOptions. + + content must be base64 encoded # noqa: E501 + + :param content: The content of this UpdateFileOptions. # noqa: E501 + :type: str + """ + if content is None: + raise ValueError("Invalid value for `content`, must not be `None`") # noqa: E501 + + 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 + + from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL # noqa: E501 + + :return: The from_path of this UpdateFileOptions. # noqa: E501 + :rtype: str + """ + return self._from_path + + @from_path.setter + def from_path(self, from_path): + """Sets the from_path of this UpdateFileOptions. + + from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL # noqa: E501 + + :param from_path: The from_path of this UpdateFileOptions. # noqa: E501 + :type: str + """ + + self._from_path = from_path + + @property + def message(self): + """Gets the message of this UpdateFileOptions. # noqa: E501 + + message (optional) for the commit of this file. if not supplied, a default message will be used # noqa: E501 + + :return: The message of this UpdateFileOptions. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this UpdateFileOptions. + + message (optional) for the commit of this file. if not supplied, a default message will be used # noqa: E501 + + :param message: The message of this UpdateFileOptions. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def new_branch(self): + """Gets the new_branch of this UpdateFileOptions. # noqa: E501 + + new_branch (optional) will make a new branch from `branch` before creating the file # noqa: E501 + + :return: The new_branch of this UpdateFileOptions. # noqa: E501 + :rtype: str + """ + return self._new_branch + + @new_branch.setter + def new_branch(self, new_branch): + """Sets the new_branch of this UpdateFileOptions. + + new_branch (optional) will make a new branch from `branch` before creating the file # noqa: E501 + + :param new_branch: The new_branch of this UpdateFileOptions. # noqa: E501 + :type: str + """ + + self._new_branch = new_branch + + @property + def sha(self): + """Gets the sha of this UpdateFileOptions. # noqa: E501 + + sha is the SHA for the file that already exists # noqa: E501 + + :return: The sha of this UpdateFileOptions. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this UpdateFileOptions. + + sha is the SHA for the file that already exists # noqa: E501 + + :param sha: The sha of this UpdateFileOptions. # noqa: E501 + :type: str + """ + if sha is None: + raise ValueError("Invalid value for `sha`, must not be `None`") # noqa: E501 + + self._sha = sha + + 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(UpdateFileOptions, 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, UpdateFileOptions): + 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/giteapython/models/user.py b/giteapython/models/user.py new file mode 100644 index 0000000..06f5a4b --- /dev/null +++ b/giteapython/models/user.py @@ -0,0 +1,335 @@ +# 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 User(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 = { + 'avatar_url': 'str', + 'created': 'datetime', + 'email': 'str', + 'full_name': 'str', + 'id': 'int', + 'is_admin': 'bool', + 'language': 'str', + 'last_login': 'datetime', + 'login': 'str' + } + + attribute_map = { + 'avatar_url': 'avatar_url', + 'created': 'created', + 'email': 'email', + 'full_name': 'full_name', + 'id': 'id', + 'is_admin': 'is_admin', + 'language': 'language', + 'last_login': 'last_login', + 'login': 'login' + } + + def __init__(self, avatar_url=None, created=None, email=None, full_name=None, id=None, is_admin=None, language=None, last_login=None, login=None): # noqa: E501 + """User - a model defined in Swagger""" # noqa: E501 + + self._avatar_url = None + self._created = None + self._email = None + self._full_name = None + self._id = None + self._is_admin = None + self._language = None + self._last_login = None + self._login = None + self.discriminator = None + + if avatar_url is not None: + self.avatar_url = avatar_url + if created is not None: + self.created = created + if email is not None: + self.email = email + if full_name is not None: + self.full_name = full_name + if id is not None: + self.id = id + if is_admin is not None: + self.is_admin = is_admin + if language is not None: + self.language = language + if last_login is not None: + self.last_login = last_login + if login is not None: + self.login = login + + @property + def avatar_url(self): + """Gets the avatar_url of this User. # noqa: E501 + + URL to the user's avatar # noqa: E501 + + :return: The avatar_url of this User. # noqa: E501 + :rtype: str + """ + return self._avatar_url + + @avatar_url.setter + def avatar_url(self, avatar_url): + """Sets the avatar_url of this User. + + URL to the user's avatar # noqa: E501 + + :param avatar_url: The avatar_url of this User. # noqa: E501 + :type: str + """ + + self._avatar_url = avatar_url + + @property + def created(self): + """Gets the created of this User. # noqa: E501 + + + :return: The created of this User. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this User. + + + :param created: The created of this User. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def email(self): + """Gets the email of this User. # noqa: E501 + + + :return: The email of this User. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this User. + + + :param email: The email of this User. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def full_name(self): + """Gets the full_name of this User. # noqa: E501 + + the user's full name # noqa: E501 + + :return: The full_name of this User. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this User. + + the user's full name # noqa: E501 + + :param full_name: The full_name of this User. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def id(self): + """Gets the id of this User. # noqa: E501 + + the user's id # noqa: E501 + + :return: The id of this User. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this User. + + the user's id # noqa: E501 + + :param id: The id of this User. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def is_admin(self): + """Gets the is_admin of this User. # noqa: E501 + + Is the user an administrator # noqa: E501 + + :return: The is_admin of this User. # noqa: E501 + :rtype: bool + """ + return self._is_admin + + @is_admin.setter + def is_admin(self, is_admin): + """Sets the is_admin of this User. + + Is the user an administrator # noqa: E501 + + :param is_admin: The is_admin of this User. # noqa: E501 + :type: bool + """ + + self._is_admin = is_admin + + @property + def language(self): + """Gets the language of this User. # noqa: E501 + + User locale # noqa: E501 + + :return: The language of this User. # noqa: E501 + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this User. + + User locale # noqa: E501 + + :param language: The language of this User. # noqa: E501 + :type: str + """ + + self._language = language + + @property + def last_login(self): + """Gets the last_login of this User. # noqa: E501 + + + :return: The last_login of this User. # noqa: E501 + :rtype: datetime + """ + return self._last_login + + @last_login.setter + def last_login(self, last_login): + """Sets the last_login of this User. + + + :param last_login: The last_login of this User. # noqa: E501 + :type: datetime + """ + + self._last_login = last_login + + @property + def login(self): + """Gets the login of this User. # noqa: E501 + + the user's username # noqa: E501 + + :return: The login of this User. # noqa: E501 + :rtype: str + """ + return self._login + + @login.setter + def login(self, login): + """Sets the login of this User. + + the user's username # noqa: E501 + + :param login: The login of this User. # noqa: E501 + :type: str + """ + + self._login = login + + 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(User, 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, User): + 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/giteapython/models/user_heatmap_data.py b/giteapython/models/user_heatmap_data.py new file mode 100644 index 0000000..439b7d1 --- /dev/null +++ b/giteapython/models/user_heatmap_data.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 UserHeatmapData(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 = { + 'contributions': 'int', + 'timestamp': 'TimeStamp' + } + + attribute_map = { + 'contributions': 'contributions', + 'timestamp': 'timestamp' + } + + def __init__(self, contributions=None, timestamp=None): # noqa: E501 + """UserHeatmapData - a model defined in Swagger""" # noqa: E501 + + self._contributions = None + self._timestamp = None + self.discriminator = None + + if contributions is not None: + self.contributions = contributions + if timestamp is not None: + self.timestamp = timestamp + + @property + def contributions(self): + """Gets the contributions of this UserHeatmapData. # noqa: E501 + + + :return: The contributions of this UserHeatmapData. # noqa: E501 + :rtype: int + """ + return self._contributions + + @contributions.setter + def contributions(self, contributions): + """Sets the contributions of this UserHeatmapData. + + + :param contributions: The contributions of this UserHeatmapData. # noqa: E501 + :type: int + """ + + self._contributions = contributions + + @property + def timestamp(self): + """Gets the timestamp of this UserHeatmapData. # noqa: E501 + + + :return: The timestamp of this UserHeatmapData. # noqa: E501 + :rtype: TimeStamp + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this UserHeatmapData. + + + :param timestamp: The timestamp of this UserHeatmapData. # noqa: E501 + :type: TimeStamp + """ + + self._timestamp = timestamp + + 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(UserHeatmapData, 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, UserHeatmapData): + 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/giteapython/models/watch_info.py b/giteapython/models/watch_info.py new file mode 100644 index 0000000..e349b9d --- /dev/null +++ b/giteapython/models/watch_info.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 WatchInfo(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_at': 'datetime', + 'ignored': 'bool', + 'reason': 'object', + 'repository_url': 'str', + 'subscribed': 'bool', + 'url': 'str' + } + + attribute_map = { + 'created_at': 'created_at', + 'ignored': 'ignored', + 'reason': 'reason', + 'repository_url': 'repository_url', + 'subscribed': 'subscribed', + 'url': 'url' + } + + def __init__(self, created_at=None, ignored=None, reason=None, repository_url=None, subscribed=None, url=None): # noqa: E501 + """WatchInfo - a model defined in Swagger""" # noqa: E501 + + self._created_at = None + self._ignored = None + self._reason = None + self._repository_url = None + self._subscribed = None + self._url = None + self.discriminator = None + + if created_at is not None: + self.created_at = created_at + if ignored is not None: + self.ignored = ignored + if reason is not None: + self.reason = reason + if repository_url is not None: + self.repository_url = repository_url + if subscribed is not None: + self.subscribed = subscribed + if url is not None: + self.url = url + + @property + def created_at(self): + """Gets the created_at of this WatchInfo. # noqa: E501 + + + :return: The created_at of this WatchInfo. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this WatchInfo. + + + :param created_at: The created_at of this WatchInfo. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def ignored(self): + """Gets the ignored of this WatchInfo. # noqa: E501 + + + :return: The ignored of this WatchInfo. # noqa: E501 + :rtype: bool + """ + return self._ignored + + @ignored.setter + def ignored(self, ignored): + """Sets the ignored of this WatchInfo. + + + :param ignored: The ignored of this WatchInfo. # noqa: E501 + :type: bool + """ + + self._ignored = ignored + + @property + def reason(self): + """Gets the reason of this WatchInfo. # noqa: E501 + + + :return: The reason of this WatchInfo. # noqa: E501 + :rtype: object + """ + return self._reason + + @reason.setter + def reason(self, reason): + """Sets the reason of this WatchInfo. + + + :param reason: The reason of this WatchInfo. # noqa: E501 + :type: object + """ + + self._reason = reason + + @property + def repository_url(self): + """Gets the repository_url of this WatchInfo. # noqa: E501 + + + :return: The repository_url of this WatchInfo. # noqa: E501 + :rtype: str + """ + return self._repository_url + + @repository_url.setter + def repository_url(self, repository_url): + """Sets the repository_url of this WatchInfo. + + + :param repository_url: The repository_url of this WatchInfo. # noqa: E501 + :type: str + """ + + self._repository_url = repository_url + + @property + def subscribed(self): + """Gets the subscribed of this WatchInfo. # noqa: E501 + + + :return: The subscribed of this WatchInfo. # noqa: E501 + :rtype: bool + """ + return self._subscribed + + @subscribed.setter + def subscribed(self, subscribed): + """Sets the subscribed of this WatchInfo. + + + :param subscribed: The subscribed of this WatchInfo. # noqa: E501 + :type: bool + """ + + self._subscribed = subscribed + + @property + def url(self): + """Gets the url of this WatchInfo. # noqa: E501 + + + :return: The url of this WatchInfo. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this WatchInfo. + + + :param url: The url of this WatchInfo. # 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(WatchInfo, 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, WatchInfo): + 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/giteapython/rest.py b/giteapython/rest.py new file mode 100644 index 0000000..7555645 --- /dev/null +++ b/giteapython/rest.py @@ -0,0 +1,323 @@ +# 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 io +import json +import logging +import re +import ssl + +import certifi +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import urlencode + +try: + import urllib3 +except ImportError: + raise ImportError('Swagger python client requires urllib3.') + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.getheaders() + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.getheader(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + # ca_certs + if configuration.ssl_ca_cert: + ca_certs = configuration.ssl_ca_cert + else: + # if not set certificate file, use Mozilla's root certificates. + ca_certs = certifi.where() + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + if 'Content-Type' not in headers: + headers['Content-Type'] = 'application/json' + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if query_params: + url += '?' + urlencode(query_params) + if re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = '{}' + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields=query_params, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # In the python 3, the response.data is bytes. + # we need to decode it to string. + if six.PY3: + r.data = r.data.decode('utf8') + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + raise ApiException(http_resp=r) + + return r + + def GET(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def OPTIONS(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def DELETE(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def POST(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PUT(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PATCH(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + +class ApiException(Exception): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..bafdc07 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +certifi >= 14.05.14 +six >= 1.10 +python_dateutil >= 2.5.3 +setuptools >= 21.0.0 +urllib3 >= 1.15.1 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..3a55820 --- /dev/null +++ b/setup.py @@ -0,0 +1,46 @@ +# 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 setuptools import setup, find_packages # noqa: H301 + +NAME = "giteapython" +VERSION = "1.12.6" +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools + +REQUIRES = [ + "certifi>=2017.4.17", + "python-dateutil>=2.1", + "six>=1.10", + "urllib3>=1.23" +] + + +setup( + name=NAME, + version=VERSION, + description="Gitea API.", + author_email="paramah@gmail.com", + url="", + keywords=["Swagger", "Gitea API."], + install_requires=REQUIRES, + packages=find_packages(), + include_package_data=True, + long_description="""\ + This documentation describes the Gitea API. # noqa: E501 + """ +) diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..2702246 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,5 @@ +coverage>=4.0.3 +nose>=1.3.7 +pluggy>=0.3.1 +py>=1.4.31 +randomize>=0.13 diff --git a/test/__init__.py b/test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_access_token.py b/test/test_access_token.py new file mode 100644 index 0000000..fd951a5 --- /dev/null +++ b/test/test_access_token.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 giteapython +from giteapython.models.access_token import AccessToken # noqa: E501 +from giteapython.rest import ApiException + + +class TestAccessToken(unittest.TestCase): + """AccessToken unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAccessToken(self): + """Test AccessToken""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.access_token.AccessToken() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_add_collaborator_option.py b/test/test_add_collaborator_option.py new file mode 100644 index 0000000..4170bba --- /dev/null +++ b/test/test_add_collaborator_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 giteapython +from giteapython.models.add_collaborator_option import AddCollaboratorOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestAddCollaboratorOption(unittest.TestCase): + """AddCollaboratorOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAddCollaboratorOption(self): + """Test AddCollaboratorOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.add_collaborator_option.AddCollaboratorOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_add_time_option.py b/test/test_add_time_option.py new file mode 100644 index 0000000..b51ada3 --- /dev/null +++ b/test/test_add_time_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 giteapython +from giteapython.models.add_time_option import AddTimeOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestAddTimeOption(unittest.TestCase): + """AddTimeOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAddTimeOption(self): + """Test AddTimeOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.add_time_option.AddTimeOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_api.py b/test/test_admin_api.py new file mode 100644 index 0000000..ee72383 --- /dev/null +++ b/test/test_admin_api.py @@ -0,0 +1,97 @@ +# 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 giteapython +from giteapython.api.admin_api import AdminApi # noqa: E501 +from giteapython.rest import ApiException + + +class TestAdminApi(unittest.TestCase): + """AdminApi unit test stubs""" + + def setUp(self): + self.api = giteapython.api.admin_api.AdminApi() # noqa: E501 + + def tearDown(self): + pass + + def test_admin_create_org(self): + """Test case for admin_create_org + + Create an organization # noqa: E501 + """ + pass + + def test_admin_create_public_key(self): + """Test case for admin_create_public_key + + Add a public key on behalf of a user # noqa: E501 + """ + pass + + def test_admin_create_repo(self): + """Test case for admin_create_repo + + Create a repository on behalf of a user # noqa: E501 + """ + pass + + def test_admin_create_user(self): + """Test case for admin_create_user + + Create a user # noqa: E501 + """ + pass + + def test_admin_delete_user(self): + """Test case for admin_delete_user + + Delete a user # noqa: E501 + """ + pass + + def test_admin_delete_user_public_key(self): + """Test case for admin_delete_user_public_key + + Delete a user's public key # noqa: E501 + """ + pass + + def test_admin_edit_user(self): + """Test case for admin_edit_user + + Edit an existing user # noqa: E501 + """ + pass + + def test_admin_get_all_orgs(self): + """Test case for admin_get_all_orgs + + List all organizations # noqa: E501 + """ + pass + + def test_admin_get_all_users(self): + """Test case for admin_get_all_users + + List all users # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_annotated_tag.py b/test/test_annotated_tag.py new file mode 100644 index 0000000..e7fb86f --- /dev/null +++ b/test/test_annotated_tag.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 giteapython +from giteapython.models.annotated_tag import AnnotatedTag # noqa: E501 +from giteapython.rest import ApiException + + +class TestAnnotatedTag(unittest.TestCase): + """AnnotatedTag unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAnnotatedTag(self): + """Test AnnotatedTag""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.annotated_tag.AnnotatedTag() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_annotated_tag_object.py b/test/test_annotated_tag_object.py new file mode 100644 index 0000000..d1dffd5 --- /dev/null +++ b/test/test_annotated_tag_object.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 giteapython +from giteapython.models.annotated_tag_object import AnnotatedTagObject # noqa: E501 +from giteapython.rest import ApiException + + +class TestAnnotatedTagObject(unittest.TestCase): + """AnnotatedTagObject unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAnnotatedTagObject(self): + """Test AnnotatedTagObject""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.annotated_tag_object.AnnotatedTagObject() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_error.py b/test/test_api_error.py new file mode 100644 index 0000000..eec0b6f --- /dev/null +++ b/test/test_api_error.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 giteapython +from giteapython.models.api_error import APIError # noqa: E501 +from giteapython.rest import ApiException + + +class TestAPIError(unittest.TestCase): + """APIError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAPIError(self): + """Test APIError""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.api_error.APIError() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_attachment.py b/test/test_attachment.py new file mode 100644 index 0000000..051c7ce --- /dev/null +++ b/test/test_attachment.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 giteapython +from giteapython.models.attachment import Attachment # noqa: E501 +from giteapython.rest import ApiException + + +class TestAttachment(unittest.TestCase): + """Attachment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAttachment(self): + """Test Attachment""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.attachment.Attachment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_branch.py b/test/test_branch.py new file mode 100644 index 0000000..b8479ae --- /dev/null +++ b/test/test_branch.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 giteapython +from giteapython.models.branch import Branch # noqa: E501 +from giteapython.rest import ApiException + + +class TestBranch(unittest.TestCase): + """Branch unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBranch(self): + """Test Branch""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.branch.Branch() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_branch_protection.py b/test/test_branch_protection.py new file mode 100644 index 0000000..5eba783 --- /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 giteapython +from giteapython.models.branch_protection import BranchProtection # noqa: E501 +from giteapython.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 = giteapython.models.branch_protection.BranchProtection() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_comment.py b/test/test_comment.py new file mode 100644 index 0000000..81a1d24 --- /dev/null +++ b/test/test_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 giteapython +from giteapython.models.comment import Comment # noqa: E501 +from giteapython.rest import ApiException + + +class TestComment(unittest.TestCase): + """Comment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testComment(self): + """Test Comment""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.comment.Comment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_commit.py b/test/test_commit.py new file mode 100644 index 0000000..78deb83 --- /dev/null +++ b/test/test_commit.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 giteapython +from giteapython.models.commit import Commit # noqa: E501 +from giteapython.rest import ApiException + + +class TestCommit(unittest.TestCase): + """Commit unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCommit(self): + """Test Commit""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.commit.Commit() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_commit_date_options.py b/test/test_commit_date_options.py new file mode 100644 index 0000000..e706c81 --- /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 giteapython +from giteapython.models.commit_date_options import CommitDateOptions # noqa: E501 +from giteapython.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 = giteapython.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 new file mode 100644 index 0000000..f558257 --- /dev/null +++ b/test/test_commit_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 giteapython +from giteapython.models.commit_meta import CommitMeta # noqa: E501 +from giteapython.rest import ApiException + + +class TestCommitMeta(unittest.TestCase): + """CommitMeta unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCommitMeta(self): + """Test CommitMeta""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.commit_meta.CommitMeta() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_commit_user.py b/test/test_commit_user.py new file mode 100644 index 0000000..2a9eb8a --- /dev/null +++ b/test/test_commit_user.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 giteapython +from giteapython.models.commit_user import CommitUser # noqa: E501 +from giteapython.rest import ApiException + + +class TestCommitUser(unittest.TestCase): + """CommitUser unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCommitUser(self): + """Test CommitUser""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.commit_user.CommitUser() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_contents_response.py b/test/test_contents_response.py new file mode 100644 index 0000000..8497fa1 --- /dev/null +++ b/test/test_contents_response.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 giteapython +from giteapython.models.contents_response import ContentsResponse # noqa: E501 +from giteapython.rest import ApiException + + +class TestContentsResponse(unittest.TestCase): + """ContentsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testContentsResponse(self): + """Test ContentsResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.contents_response.ContentsResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_branch_protection_option.py b/test/test_create_branch_protection_option.py new file mode 100644 index 0000000..2112591 --- /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 giteapython +from giteapython.models.create_branch_protection_option import CreateBranchProtectionOption # noqa: E501 +from giteapython.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 = giteapython.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 new file mode 100644 index 0000000..758b82f --- /dev/null +++ b/test/test_create_email_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 giteapython +from giteapython.models.create_email_option import CreateEmailOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestCreateEmailOption(unittest.TestCase): + """CreateEmailOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateEmailOption(self): + """Test CreateEmailOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.create_email_option.CreateEmailOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_file_options.py b/test/test_create_file_options.py new file mode 100644 index 0000000..9e83a9c --- /dev/null +++ b/test/test_create_file_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 giteapython +from giteapython.models.create_file_options import CreateFileOptions # noqa: E501 +from giteapython.rest import ApiException + + +class TestCreateFileOptions(unittest.TestCase): + """CreateFileOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateFileOptions(self): + """Test CreateFileOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.create_file_options.CreateFileOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_fork_option.py b/test/test_create_fork_option.py new file mode 100644 index 0000000..68df6c8 --- /dev/null +++ b/test/test_create_fork_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 giteapython +from giteapython.models.create_fork_option import CreateForkOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestCreateForkOption(unittest.TestCase): + """CreateForkOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateForkOption(self): + """Test CreateForkOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.create_fork_option.CreateForkOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_gpg_key_option.py b/test/test_create_gpg_key_option.py new file mode 100644 index 0000000..fb31839 --- /dev/null +++ b/test/test_create_gpg_key_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 giteapython +from giteapython.models.create_gpg_key_option import CreateGPGKeyOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestCreateGPGKeyOption(unittest.TestCase): + """CreateGPGKeyOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateGPGKeyOption(self): + """Test CreateGPGKeyOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.create_gpg_key_option.CreateGPGKeyOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_hook_option.py b/test/test_create_hook_option.py new file mode 100644 index 0000000..0343fc8 --- /dev/null +++ b/test/test_create_hook_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 giteapython +from giteapython.models.create_hook_option import CreateHookOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestCreateHookOption(unittest.TestCase): + """CreateHookOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateHookOption(self): + """Test CreateHookOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.create_hook_option.CreateHookOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_hook_option_config.py b/test/test_create_hook_option_config.py new file mode 100644 index 0000000..0c5aec4 --- /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 giteapython +from giteapython.models.create_hook_option_config import CreateHookOptionConfig # noqa: E501 +from giteapython.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 = giteapython.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 new file mode 100644 index 0000000..2501c33 --- /dev/null +++ b/test/test_create_issue_comment_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 giteapython +from giteapython.models.create_issue_comment_option import CreateIssueCommentOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestCreateIssueCommentOption(unittest.TestCase): + """CreateIssueCommentOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateIssueCommentOption(self): + """Test CreateIssueCommentOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.create_issue_comment_option.CreateIssueCommentOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_issue_option.py b/test/test_create_issue_option.py new file mode 100644 index 0000000..3f5e431 --- /dev/null +++ b/test/test_create_issue_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 giteapython +from giteapython.models.create_issue_option import CreateIssueOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestCreateIssueOption(unittest.TestCase): + """CreateIssueOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateIssueOption(self): + """Test CreateIssueOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.create_issue_option.CreateIssueOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_key_option.py b/test/test_create_key_option.py new file mode 100644 index 0000000..ec6660b --- /dev/null +++ b/test/test_create_key_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 giteapython +from giteapython.models.create_key_option import CreateKeyOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestCreateKeyOption(unittest.TestCase): + """CreateKeyOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateKeyOption(self): + """Test CreateKeyOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.create_key_option.CreateKeyOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_label_option.py b/test/test_create_label_option.py new file mode 100644 index 0000000..8f16f93 --- /dev/null +++ b/test/test_create_label_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 giteapython +from giteapython.models.create_label_option import CreateLabelOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestCreateLabelOption(unittest.TestCase): + """CreateLabelOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateLabelOption(self): + """Test CreateLabelOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.create_label_option.CreateLabelOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_milestone_option.py b/test/test_create_milestone_option.py new file mode 100644 index 0000000..cbd176c --- /dev/null +++ b/test/test_create_milestone_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 giteapython +from giteapython.models.create_milestone_option import CreateMilestoneOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestCreateMilestoneOption(unittest.TestCase): + """CreateMilestoneOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateMilestoneOption(self): + """Test CreateMilestoneOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.create_milestone_option.CreateMilestoneOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() 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..7d67f09 --- /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 giteapython +from giteapython.models.create_o_auth2_application_options import CreateOAuth2ApplicationOptions # noqa: E501 +from giteapython.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 = giteapython.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 new file mode 100644 index 0000000..f983292 --- /dev/null +++ b/test/test_create_org_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 giteapython +from giteapython.models.create_org_option import CreateOrgOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestCreateOrgOption(unittest.TestCase): + """CreateOrgOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateOrgOption(self): + """Test CreateOrgOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.create_org_option.CreateOrgOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_pull_request_option.py b/test/test_create_pull_request_option.py new file mode 100644 index 0000000..2f9fe39 --- /dev/null +++ b/test/test_create_pull_request_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 giteapython +from giteapython.models.create_pull_request_option import CreatePullRequestOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestCreatePullRequestOption(unittest.TestCase): + """CreatePullRequestOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreatePullRequestOption(self): + """Test CreatePullRequestOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.create_pull_request_option.CreatePullRequestOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_pull_review_comment.py b/test/test_create_pull_review_comment.py new file mode 100644 index 0000000..d0ba102 --- /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 giteapython +from giteapython.models.create_pull_review_comment import CreatePullReviewComment # noqa: E501 +from giteapython.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 = giteapython.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..b46b839 --- /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 giteapython +from giteapython.models.create_pull_review_options import CreatePullReviewOptions # noqa: E501 +from giteapython.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 = giteapython.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 new file mode 100644 index 0000000..ce6c661 --- /dev/null +++ b/test/test_create_release_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 giteapython +from giteapython.models.create_release_option import CreateReleaseOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestCreateReleaseOption(unittest.TestCase): + """CreateReleaseOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateReleaseOption(self): + """Test CreateReleaseOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.create_release_option.CreateReleaseOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_repo_option.py b/test/test_create_repo_option.py new file mode 100644 index 0000000..6c5233e --- /dev/null +++ b/test/test_create_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 giteapython +from giteapython.models.create_repo_option import CreateRepoOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestCreateRepoOption(unittest.TestCase): + """CreateRepoOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateRepoOption(self): + """Test CreateRepoOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.create_repo_option.CreateRepoOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_status_option.py b/test/test_create_status_option.py new file mode 100644 index 0000000..70a7932 --- /dev/null +++ b/test/test_create_status_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 giteapython +from giteapython.models.create_status_option import CreateStatusOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestCreateStatusOption(unittest.TestCase): + """CreateStatusOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateStatusOption(self): + """Test CreateStatusOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.create_status_option.CreateStatusOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_team_option.py b/test/test_create_team_option.py new file mode 100644 index 0000000..2666289 --- /dev/null +++ b/test/test_create_team_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 giteapython +from giteapython.models.create_team_option import CreateTeamOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestCreateTeamOption(unittest.TestCase): + """CreateTeamOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateTeamOption(self): + """Test CreateTeamOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.create_team_option.CreateTeamOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_user_option.py b/test/test_create_user_option.py new file mode 100644 index 0000000..882dea0 --- /dev/null +++ b/test/test_create_user_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 giteapython +from giteapython.models.create_user_option import CreateUserOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestCreateUserOption(unittest.TestCase): + """CreateUserOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateUserOption(self): + """Test CreateUserOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.create_user_option.CreateUserOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_delete_email_option.py b/test/test_delete_email_option.py new file mode 100644 index 0000000..e8b0b8b --- /dev/null +++ b/test/test_delete_email_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 giteapython +from giteapython.models.delete_email_option import DeleteEmailOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestDeleteEmailOption(unittest.TestCase): + """DeleteEmailOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDeleteEmailOption(self): + """Test DeleteEmailOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.delete_email_option.DeleteEmailOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_delete_file_options.py b/test/test_delete_file_options.py new file mode 100644 index 0000000..26d4e83 --- /dev/null +++ b/test/test_delete_file_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 giteapython +from giteapython.models.delete_file_options import DeleteFileOptions # noqa: E501 +from giteapython.rest import ApiException + + +class TestDeleteFileOptions(unittest.TestCase): + """DeleteFileOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDeleteFileOptions(self): + """Test DeleteFileOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.delete_file_options.DeleteFileOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_deploy_key.py b/test/test_deploy_key.py new file mode 100644 index 0000000..5f32c57 --- /dev/null +++ b/test/test_deploy_key.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 giteapython +from giteapython.models.deploy_key import DeployKey # noqa: E501 +from giteapython.rest import ApiException + + +class TestDeployKey(unittest.TestCase): + """DeployKey unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDeployKey(self): + """Test DeployKey""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.deploy_key.DeployKey() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_attachment_options.py b/test/test_edit_attachment_options.py new file mode 100644 index 0000000..be88a63 --- /dev/null +++ b/test/test_edit_attachment_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 giteapython +from giteapython.models.edit_attachment_options import EditAttachmentOptions # noqa: E501 +from giteapython.rest import ApiException + + +class TestEditAttachmentOptions(unittest.TestCase): + """EditAttachmentOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditAttachmentOptions(self): + """Test EditAttachmentOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.edit_attachment_options.EditAttachmentOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_branch_protection_option.py b/test/test_edit_branch_protection_option.py new file mode 100644 index 0000000..11069b8 --- /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 giteapython +from giteapython.models.edit_branch_protection_option import EditBranchProtectionOption # noqa: E501 +from giteapython.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 = giteapython.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 new file mode 100644 index 0000000..52250b5 --- /dev/null +++ b/test/test_edit_deadline_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 giteapython +from giteapython.models.edit_deadline_option import EditDeadlineOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestEditDeadlineOption(unittest.TestCase): + """EditDeadlineOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditDeadlineOption(self): + """Test EditDeadlineOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.edit_deadline_option.EditDeadlineOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_git_hook_option.py b/test/test_edit_git_hook_option.py new file mode 100644 index 0000000..4f5ba83 --- /dev/null +++ b/test/test_edit_git_hook_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 giteapython +from giteapython.models.edit_git_hook_option import EditGitHookOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestEditGitHookOption(unittest.TestCase): + """EditGitHookOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditGitHookOption(self): + """Test EditGitHookOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.edit_git_hook_option.EditGitHookOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_hook_option.py b/test/test_edit_hook_option.py new file mode 100644 index 0000000..a562a6b --- /dev/null +++ b/test/test_edit_hook_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 giteapython +from giteapython.models.edit_hook_option import EditHookOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestEditHookOption(unittest.TestCase): + """EditHookOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditHookOption(self): + """Test EditHookOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.edit_hook_option.EditHookOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_issue_comment_option.py b/test/test_edit_issue_comment_option.py new file mode 100644 index 0000000..5ca02ab --- /dev/null +++ b/test/test_edit_issue_comment_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 giteapython +from giteapython.models.edit_issue_comment_option import EditIssueCommentOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestEditIssueCommentOption(unittest.TestCase): + """EditIssueCommentOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditIssueCommentOption(self): + """Test EditIssueCommentOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.edit_issue_comment_option.EditIssueCommentOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_issue_option.py b/test/test_edit_issue_option.py new file mode 100644 index 0000000..1a4a08a --- /dev/null +++ b/test/test_edit_issue_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 giteapython +from giteapython.models.edit_issue_option import EditIssueOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestEditIssueOption(unittest.TestCase): + """EditIssueOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditIssueOption(self): + """Test EditIssueOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.edit_issue_option.EditIssueOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_label_option.py b/test/test_edit_label_option.py new file mode 100644 index 0000000..1739ea0 --- /dev/null +++ b/test/test_edit_label_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 giteapython +from giteapython.models.edit_label_option import EditLabelOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestEditLabelOption(unittest.TestCase): + """EditLabelOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditLabelOption(self): + """Test EditLabelOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.edit_label_option.EditLabelOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_milestone_option.py b/test/test_edit_milestone_option.py new file mode 100644 index 0000000..3ccd066 --- /dev/null +++ b/test/test_edit_milestone_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 giteapython +from giteapython.models.edit_milestone_option import EditMilestoneOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestEditMilestoneOption(unittest.TestCase): + """EditMilestoneOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditMilestoneOption(self): + """Test EditMilestoneOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.edit_milestone_option.EditMilestoneOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_org_option.py b/test/test_edit_org_option.py new file mode 100644 index 0000000..a507455 --- /dev/null +++ b/test/test_edit_org_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 giteapython +from giteapython.models.edit_org_option import EditOrgOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestEditOrgOption(unittest.TestCase): + """EditOrgOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditOrgOption(self): + """Test EditOrgOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.edit_org_option.EditOrgOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_pull_request_option.py b/test/test_edit_pull_request_option.py new file mode 100644 index 0000000..6985ca2 --- /dev/null +++ b/test/test_edit_pull_request_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 giteapython +from giteapython.models.edit_pull_request_option import EditPullRequestOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestEditPullRequestOption(unittest.TestCase): + """EditPullRequestOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditPullRequestOption(self): + """Test EditPullRequestOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.edit_pull_request_option.EditPullRequestOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_reaction_option.py b/test/test_edit_reaction_option.py new file mode 100644 index 0000000..e2e77da --- /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 giteapython +from giteapython.models.edit_reaction_option import EditReactionOption # noqa: E501 +from giteapython.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 = giteapython.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 new file mode 100644 index 0000000..36e87f9 --- /dev/null +++ b/test/test_edit_release_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 giteapython +from giteapython.models.edit_release_option import EditReleaseOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestEditReleaseOption(unittest.TestCase): + """EditReleaseOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditReleaseOption(self): + """Test EditReleaseOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.edit_release_option.EditReleaseOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_repo_option.py b/test/test_edit_repo_option.py new file mode 100644 index 0000000..842d70b --- /dev/null +++ b/test/test_edit_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 giteapython +from giteapython.models.edit_repo_option import EditRepoOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestEditRepoOption(unittest.TestCase): + """EditRepoOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditRepoOption(self): + """Test EditRepoOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.edit_repo_option.EditRepoOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_team_option.py b/test/test_edit_team_option.py new file mode 100644 index 0000000..bb5b189 --- /dev/null +++ b/test/test_edit_team_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 giteapython +from giteapython.models.edit_team_option import EditTeamOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestEditTeamOption(unittest.TestCase): + """EditTeamOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditTeamOption(self): + """Test EditTeamOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.edit_team_option.EditTeamOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_user_option.py b/test/test_edit_user_option.py new file mode 100644 index 0000000..ece1a47 --- /dev/null +++ b/test/test_edit_user_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 giteapython +from giteapython.models.edit_user_option import EditUserOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestEditUserOption(unittest.TestCase): + """EditUserOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditUserOption(self): + """Test EditUserOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.edit_user_option.EditUserOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email.py b/test/test_email.py new file mode 100644 index 0000000..8e4f0d2 --- /dev/null +++ b/test/test_email.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 giteapython +from giteapython.models.email import Email # noqa: E501 +from giteapython.rest import ApiException + + +class TestEmail(unittest.TestCase): + """Email unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEmail(self): + """Test Email""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.email.Email() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_external_tracker.py b/test/test_external_tracker.py new file mode 100644 index 0000000..e017781 --- /dev/null +++ b/test/test_external_tracker.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 giteapython +from giteapython.models.external_tracker import ExternalTracker # noqa: E501 +from giteapython.rest import ApiException + + +class TestExternalTracker(unittest.TestCase): + """ExternalTracker unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testExternalTracker(self): + """Test ExternalTracker""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.external_tracker.ExternalTracker() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_external_wiki.py b/test/test_external_wiki.py new file mode 100644 index 0000000..9331e87 --- /dev/null +++ b/test/test_external_wiki.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 giteapython +from giteapython.models.external_wiki import ExternalWiki # noqa: E501 +from giteapython.rest import ApiException + + +class TestExternalWiki(unittest.TestCase): + """ExternalWiki unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testExternalWiki(self): + """Test ExternalWiki""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.external_wiki.ExternalWiki() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_file_commit_response.py b/test/test_file_commit_response.py new file mode 100644 index 0000000..fcf518c --- /dev/null +++ b/test/test_file_commit_response.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 giteapython +from giteapython.models.file_commit_response import FileCommitResponse # noqa: E501 +from giteapython.rest import ApiException + + +class TestFileCommitResponse(unittest.TestCase): + """FileCommitResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFileCommitResponse(self): + """Test FileCommitResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.file_commit_response.FileCommitResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_file_delete_response.py b/test/test_file_delete_response.py new file mode 100644 index 0000000..bb35d74 --- /dev/null +++ b/test/test_file_delete_response.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 giteapython +from giteapython.models.file_delete_response import FileDeleteResponse # noqa: E501 +from giteapython.rest import ApiException + + +class TestFileDeleteResponse(unittest.TestCase): + """FileDeleteResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFileDeleteResponse(self): + """Test FileDeleteResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.file_delete_response.FileDeleteResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_file_links_response.py b/test/test_file_links_response.py new file mode 100644 index 0000000..49cb97a --- /dev/null +++ b/test/test_file_links_response.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 giteapython +from giteapython.models.file_links_response import FileLinksResponse # noqa: E501 +from giteapython.rest import ApiException + + +class TestFileLinksResponse(unittest.TestCase): + """FileLinksResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFileLinksResponse(self): + """Test FileLinksResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.file_links_response.FileLinksResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_file_response.py b/test/test_file_response.py new file mode 100644 index 0000000..66e65ed --- /dev/null +++ b/test/test_file_response.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 giteapython +from giteapython.models.file_response import FileResponse # noqa: E501 +from giteapython.rest import ApiException + + +class TestFileResponse(unittest.TestCase): + """FileResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFileResponse(self): + """Test FileResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.file_response.FileResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_git_blob_response.py b/test/test_git_blob_response.py new file mode 100644 index 0000000..78a3c10 --- /dev/null +++ b/test/test_git_blob_response.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 giteapython +from giteapython.models.git_blob_response import GitBlobResponse # noqa: E501 +from giteapython.rest import ApiException + + +class TestGitBlobResponse(unittest.TestCase): + """GitBlobResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGitBlobResponse(self): + """Test GitBlobResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.git_blob_response.GitBlobResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_git_entry.py b/test/test_git_entry.py new file mode 100644 index 0000000..ed5efba --- /dev/null +++ b/test/test_git_entry.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 giteapython +from giteapython.models.git_entry import GitEntry # noqa: E501 +from giteapython.rest import ApiException + + +class TestGitEntry(unittest.TestCase): + """GitEntry unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGitEntry(self): + """Test GitEntry""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.git_entry.GitEntry() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_git_hook.py b/test/test_git_hook.py new file mode 100644 index 0000000..9ea78b4 --- /dev/null +++ b/test/test_git_hook.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 giteapython +from giteapython.models.git_hook import GitHook # noqa: E501 +from giteapython.rest import ApiException + + +class TestGitHook(unittest.TestCase): + """GitHook unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGitHook(self): + """Test GitHook""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.git_hook.GitHook() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_git_object.py b/test/test_git_object.py new file mode 100644 index 0000000..19ad236 --- /dev/null +++ b/test/test_git_object.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 giteapython +from giteapython.models.git_object import GitObject # noqa: E501 +from giteapython.rest import ApiException + + +class TestGitObject(unittest.TestCase): + """GitObject unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGitObject(self): + """Test GitObject""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.git_object.GitObject() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_git_tree_response.py b/test/test_git_tree_response.py new file mode 100644 index 0000000..439be6a --- /dev/null +++ b/test/test_git_tree_response.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 giteapython +from giteapython.models.git_tree_response import GitTreeResponse # noqa: E501 +from giteapython.rest import ApiException + + +class TestGitTreeResponse(unittest.TestCase): + """GitTreeResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGitTreeResponse(self): + """Test GitTreeResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.git_tree_response.GitTreeResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_gpg_key.py b/test/test_gpg_key.py new file mode 100644 index 0000000..507d5e5 --- /dev/null +++ b/test/test_gpg_key.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 giteapython +from giteapython.models.gpg_key import GPGKey # noqa: E501 +from giteapython.rest import ApiException + + +class TestGPGKey(unittest.TestCase): + """GPGKey unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGPGKey(self): + """Test GPGKey""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.gpg_key.GPGKey() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_gpg_key_email.py b/test/test_gpg_key_email.py new file mode 100644 index 0000000..2e83c24 --- /dev/null +++ b/test/test_gpg_key_email.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 giteapython +from giteapython.models.gpg_key_email import GPGKeyEmail # noqa: E501 +from giteapython.rest import ApiException + + +class TestGPGKeyEmail(unittest.TestCase): + """GPGKeyEmail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGPGKeyEmail(self): + """Test GPGKeyEmail""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.gpg_key_email.GPGKeyEmail() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_hook.py b/test/test_hook.py new file mode 100644 index 0000000..07205b7 --- /dev/null +++ b/test/test_hook.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 giteapython +from giteapython.models.hook import Hook # noqa: E501 +from giteapython.rest import ApiException + + +class TestHook(unittest.TestCase): + """Hook unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testHook(self): + """Test Hook""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.hook.Hook() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_identity.py b/test/test_identity.py new file mode 100644 index 0000000..614eb2b --- /dev/null +++ b/test/test_identity.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 giteapython +from giteapython.models.identity import Identity # noqa: E501 +from giteapython.rest import ApiException + + +class TestIdentity(unittest.TestCase): + """Identity unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIdentity(self): + """Test Identity""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.identity.Identity() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_response200.py b/test/test_inline_response200.py new file mode 100644 index 0000000..acd793b --- /dev/null +++ b/test/test_inline_response200.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 giteapython +from giteapython.models.inline_response200 import InlineResponse200 # noqa: E501 +from giteapython.rest import ApiException + + +class TestInlineResponse200(unittest.TestCase): + """InlineResponse200 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse200(self): + """Test InlineResponse200""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.inline_response200.InlineResponse200() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_response2001.py b/test/test_inline_response2001.py new file mode 100644 index 0000000..5c5b1a0 --- /dev/null +++ b/test/test_inline_response2001.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 giteapython +from giteapython.models.inline_response2001 import InlineResponse2001 # noqa: E501 +from giteapython.rest import ApiException + + +class TestInlineResponse2001(unittest.TestCase): + """InlineResponse2001 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2001(self): + """Test InlineResponse2001""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.inline_response2001.InlineResponse2001() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_internal_tracker.py b/test/test_internal_tracker.py new file mode 100644 index 0000000..2120151 --- /dev/null +++ b/test/test_internal_tracker.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 giteapython +from giteapython.models.internal_tracker import InternalTracker # noqa: E501 +from giteapython.rest import ApiException + + +class TestInternalTracker(unittest.TestCase): + """InternalTracker unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInternalTracker(self): + """Test InternalTracker""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.internal_tracker.InternalTracker() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue.py b/test/test_issue.py new file mode 100644 index 0000000..5eccce4 --- /dev/null +++ b/test/test_issue.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 giteapython +from giteapython.models.issue import Issue # noqa: E501 +from giteapython.rest import ApiException + + +class TestIssue(unittest.TestCase): + """Issue unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssue(self): + """Test Issue""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.issue.Issue() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_api.py b/test/test_issue_api.py new file mode 100644 index 0000000..020f39e --- /dev/null +++ b/test/test_issue_api.py @@ -0,0 +1,356 @@ +# 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 giteapython +from giteapython.api.issue_api import IssueApi # noqa: E501 +from giteapython.rest import ApiException + + +class TestIssueApi(unittest.TestCase): + """IssueApi unit test stubs""" + + def setUp(self): + self.api = giteapython.api.issue_api.IssueApi() # noqa: E501 + + def tearDown(self): + pass + + def test_issue_add_label(self): + """Test case for issue_add_label + + Add a label to an issue # noqa: E501 + """ + pass + + def test_issue_add_subscription(self): + """Test case for issue_add_subscription + + Subscribe user to issue # noqa: E501 + """ + pass + + def test_issue_add_time(self): + """Test case for issue_add_time + + Add tracked time to a issue # noqa: E501 + """ + pass + + def test_issue_check_subscription(self): + """Test case for issue_check_subscription + + Check if user is subscribed to an issue # noqa: E501 + """ + pass + + def test_issue_clear_labels(self): + """Test case for issue_clear_labels + + Remove all labels from an issue # noqa: E501 + """ + pass + + def test_issue_create_comment(self): + """Test case for issue_create_comment + + Add a comment to an issue # noqa: E501 + """ + pass + + def test_issue_create_issue(self): + """Test case for issue_create_issue + + Create an issue. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + """ + pass + + def test_issue_create_label(self): + """Test case for issue_create_label + + Create a label # noqa: E501 + """ + pass + + def test_issue_create_milestone(self): + """Test case for issue_create_milestone + + Create a milestone # noqa: E501 + """ + pass + + def test_issue_delete_comment(self): + """Test case for issue_delete_comment + + Delete a comment # noqa: E501 + """ + pass + + def test_issue_delete_comment_deprecated(self): + """Test case for issue_delete_comment_deprecated + + Delete a comment # noqa: E501 + """ + pass + + def test_issue_delete_comment_reaction(self): + """Test case for issue_delete_comment_reaction + + Remove a reaction from a comment of an issue # noqa: E501 + """ + pass + + def test_issue_delete_issue_reaction(self): + """Test case for issue_delete_issue_reaction + + Remove a reaction from an issue # noqa: E501 + """ + pass + + def test_issue_delete_label(self): + """Test case for issue_delete_label + + Delete a label # noqa: E501 + """ + pass + + def test_issue_delete_milestone(self): + """Test case for issue_delete_milestone + + Delete a milestone # noqa: E501 + """ + pass + + def test_issue_delete_stop_watch(self): + """Test case for issue_delete_stop_watch + + Delete an issue's existing stopwatch. # noqa: E501 + """ + pass + + def test_issue_delete_subscription(self): + """Test case for issue_delete_subscription + + Unsubscribe user from issue # noqa: E501 + """ + pass + + def test_issue_delete_time(self): + """Test case for issue_delete_time + + Delete specific tracked time # noqa: E501 + """ + pass + + def test_issue_edit_comment(self): + """Test case for issue_edit_comment + + Edit a comment # noqa: E501 + """ + pass + + def test_issue_edit_comment_deprecated(self): + """Test case for issue_edit_comment_deprecated + + Edit a comment # noqa: E501 + """ + pass + + def test_issue_edit_issue(self): + """Test case for issue_edit_issue + + Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + """ + pass + + def test_issue_edit_issue_deadline(self): + """Test case for issue_edit_issue_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. # noqa: E501 + """ + pass + + def test_issue_edit_label(self): + """Test case for issue_edit_label + + Update a label # noqa: E501 + """ + pass + + def test_issue_edit_milestone(self): + """Test case for issue_edit_milestone + + Update a milestone # noqa: E501 + """ + pass + + def test_issue_get_comment(self): + """Test case for issue_get_comment + + Get a comment # noqa: E501 + """ + pass + + def test_issue_get_comment_reactions(self): + """Test case for issue_get_comment_reactions + + Get a list of reactions from a comment of an issue # noqa: E501 + """ + pass + + def test_issue_get_comments(self): + """Test case for issue_get_comments + + List all comments on an issue # noqa: E501 + """ + pass + + def test_issue_get_issue(self): + """Test case for issue_get_issue + + Get an issue # noqa: E501 + """ + pass + + def test_issue_get_issue_reactions(self): + """Test case for issue_get_issue_reactions + + Get a list reactions of an issue # noqa: E501 + """ + pass + + def test_issue_get_label(self): + """Test case for issue_get_label + + Get a single label # noqa: E501 + """ + pass + + def test_issue_get_labels(self): + """Test case for issue_get_labels + + Get an issue's labels # noqa: E501 + """ + pass + + def test_issue_get_milestone(self): + """Test case for issue_get_milestone + + Get a milestone # noqa: E501 + """ + pass + + def test_issue_get_milestones_list(self): + """Test case for issue_get_milestones_list + + Get all of a repository's opened milestones # noqa: E501 + """ + pass + + def test_issue_get_repo_comments(self): + """Test case for issue_get_repo_comments + + List all comments in a repository # noqa: E501 + """ + pass + + def test_issue_list_issues(self): + """Test case for issue_list_issues + + List a repository's issues # noqa: E501 + """ + pass + + def test_issue_list_labels(self): + """Test case for issue_list_labels + + Get all of a repository's labels # noqa: E501 + """ + pass + + def test_issue_post_comment_reaction(self): + """Test case for issue_post_comment_reaction + + Add a reaction to a comment of an issue # noqa: E501 + """ + pass + + def test_issue_post_issue_reaction(self): + """Test case for issue_post_issue_reaction + + Add a reaction to an issue # noqa: E501 + """ + pass + + def test_issue_remove_label(self): + """Test case for issue_remove_label + + Remove a label from an issue # noqa: E501 + """ + pass + + def test_issue_replace_labels(self): + """Test case for issue_replace_labels + + Replace an issue's labels # noqa: E501 + """ + pass + + def test_issue_reset_time(self): + """Test case for issue_reset_time + + Reset a tracked time of an issue # noqa: E501 + """ + pass + + def test_issue_search_issues(self): + """Test case for issue_search_issues + + Search for issues across the repositories that the user has access to # noqa: E501 + """ + pass + + def test_issue_start_stop_watch(self): + """Test case for issue_start_stop_watch + + Start stopwatch on an issue. # noqa: E501 + """ + pass + + def test_issue_stop_stop_watch(self): + """Test case for issue_stop_stop_watch + + Stop an issue's existing stopwatch. # noqa: E501 + """ + pass + + def test_issue_subscriptions(self): + """Test case for issue_subscriptions + + Get users who subscribed on an issue. # noqa: E501 + """ + pass + + def test_issue_tracked_times(self): + """Test case for issue_tracked_times + + List an issue's tracked times # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_deadline.py b/test/test_issue_deadline.py new file mode 100644 index 0000000..d4c8556 --- /dev/null +++ b/test/test_issue_deadline.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 giteapython +from giteapython.models.issue_deadline import IssueDeadline # noqa: E501 +from giteapython.rest import ApiException + + +class TestIssueDeadline(unittest.TestCase): + """IssueDeadline unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssueDeadline(self): + """Test IssueDeadline""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.issue_deadline.IssueDeadline() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_labels_option.py b/test/test_issue_labels_option.py new file mode 100644 index 0000000..0e52d67 --- /dev/null +++ b/test/test_issue_labels_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 giteapython +from giteapython.models.issue_labels_option import IssueLabelsOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestIssueLabelsOption(unittest.TestCase): + """IssueLabelsOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssueLabelsOption(self): + """Test IssueLabelsOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.issue_labels_option.IssueLabelsOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_label.py b/test/test_label.py new file mode 100644 index 0000000..aa9bc67 --- /dev/null +++ b/test/test_label.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 giteapython +from giteapython.models.label import Label # noqa: E501 +from giteapython.rest import ApiException + + +class TestLabel(unittest.TestCase): + """Label unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLabel(self): + """Test Label""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.label.Label() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_markdown_option.py b/test/test_markdown_option.py new file mode 100644 index 0000000..bfa7850 --- /dev/null +++ b/test/test_markdown_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 giteapython +from giteapython.models.markdown_option import MarkdownOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestMarkdownOption(unittest.TestCase): + """MarkdownOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMarkdownOption(self): + """Test MarkdownOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.markdown_option.MarkdownOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_merge_pull_request_option.py b/test/test_merge_pull_request_option.py new file mode 100644 index 0000000..e59bca2 --- /dev/null +++ b/test/test_merge_pull_request_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 giteapython +from giteapython.models.merge_pull_request_option import MergePullRequestOption # noqa: E501 +from giteapython.rest import ApiException + + +class TestMergePullRequestOption(unittest.TestCase): + """MergePullRequestOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMergePullRequestOption(self): + """Test MergePullRequestOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.merge_pull_request_option.MergePullRequestOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_migrate_repo_form.py b/test/test_migrate_repo_form.py new file mode 100644 index 0000000..9d316b2 --- /dev/null +++ b/test/test_migrate_repo_form.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 giteapython +from giteapython.models.migrate_repo_form import MigrateRepoForm # noqa: E501 +from giteapython.rest import ApiException + + +class TestMigrateRepoForm(unittest.TestCase): + """MigrateRepoForm unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMigrateRepoForm(self): + """Test MigrateRepoForm""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.migrate_repo_form.MigrateRepoForm() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_milestone.py b/test/test_milestone.py new file mode 100644 index 0000000..16060e6 --- /dev/null +++ b/test/test_milestone.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 giteapython +from giteapython.models.milestone import Milestone # noqa: E501 +from giteapython.rest import ApiException + + +class TestMilestone(unittest.TestCase): + """Milestone unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMilestone(self): + """Test Milestone""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.milestone.Milestone() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_miscellaneous_api.py b/test/test_miscellaneous_api.py new file mode 100644 index 0000000..54bad9f --- /dev/null +++ b/test/test_miscellaneous_api.py @@ -0,0 +1,62 @@ +# 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 giteapython +from giteapython.api.miscellaneous_api import MiscellaneousApi # noqa: E501 +from giteapython.rest import ApiException + + +class TestMiscellaneousApi(unittest.TestCase): + """MiscellaneousApi unit test stubs""" + + def setUp(self): + self.api = giteapython.api.miscellaneous_api.MiscellaneousApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_signing_key(self): + """Test case for get_signing_key + + Get default signing-key.gpg # noqa: E501 + """ + pass + + def test_get_version(self): + """Test case for get_version + + Returns the version of the Gitea application # noqa: E501 + """ + pass + + def test_render_markdown(self): + """Test case for render_markdown + + Render a markdown document as HTML # noqa: E501 + """ + pass + + def test_render_markdown_raw(self): + """Test case for render_markdown_raw + + Render raw markdown as HTML # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_notification_api.py b/test/test_notification_api.py new file mode 100644 index 0000000..a5d3469 --- /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 giteapython +from giteapython.api.notification_api import NotificationApi # noqa: E501 +from giteapython.rest import ApiException + + +class TestNotificationApi(unittest.TestCase): + """NotificationApi unit test stubs""" + + def setUp(self): + self.api = giteapython.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, pinned or unread # noqa: E501 + """ + pass + + def test_notify_read_repo_list(self): + """Test case for notify_read_repo_list + + Mark notification threads as read, pinned or unread 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..7272f78 --- /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 giteapython +from giteapython.models.notification_count import NotificationCount # noqa: E501 +from giteapython.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 = giteapython.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..a2411cd --- /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 giteapython +from giteapython.models.notification_subject import NotificationSubject # noqa: E501 +from giteapython.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 = giteapython.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..685cf4c --- /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 giteapython +from giteapython.models.notification_thread import NotificationThread # noqa: E501 +from giteapython.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 = giteapython.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..8e15735 --- /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 giteapython +from giteapython.models.o_auth2_application import OAuth2Application # noqa: E501 +from giteapython.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 = giteapython.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 new file mode 100644 index 0000000..0c15835 --- /dev/null +++ b/test/test_organization.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 giteapython +from giteapython.models.organization import Organization # noqa: E501 +from giteapython.rest import ApiException + + +class TestOrganization(unittest.TestCase): + """Organization unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOrganization(self): + """Test Organization""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.organization.Organization() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_organization_api.py b/test/test_organization_api.py new file mode 100644 index 0000000..b12ef46 --- /dev/null +++ b/test/test_organization_api.py @@ -0,0 +1,314 @@ +# 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 giteapython +from giteapython.api.organization_api import OrganizationApi # noqa: E501 +from giteapython.rest import ApiException + + +class TestOrganizationApi(unittest.TestCase): + """OrganizationApi unit test stubs""" + + def setUp(self): + self.api = giteapython.api.organization_api.OrganizationApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_org_repo(self): + """Test case for create_org_repo + + Create a repository in an organization # noqa: E501 + """ + pass + + def test_create_org_repo_deprecated(self): + """Test case for create_org_repo_deprecated + + Create a repository in an organization # noqa: E501 + """ + pass + + def test_org_add_team_member(self): + """Test case for org_add_team_member + + Add a team member # noqa: E501 + """ + pass + + def test_org_add_team_repository(self): + """Test case for org_add_team_repository + + Add a repository to a team # noqa: E501 + """ + pass + + def test_org_conceal_member(self): + """Test case for org_conceal_member + + Conceal a user's membership # noqa: E501 + """ + pass + + def test_org_create(self): + """Test case for org_create + + Create an organization # noqa: E501 + """ + pass + + def test_org_create_hook(self): + """Test case for org_create_hook + + Create a hook # noqa: E501 + """ + pass + + def test_org_create_label(self): + """Test case for org_create_label + + Create a label for an organization # noqa: E501 + """ + pass + + def test_org_create_team(self): + """Test case for org_create_team + + Create a team # noqa: E501 + """ + pass + + def test_org_delete(self): + """Test case for org_delete + + Delete an organization # noqa: E501 + """ + pass + + def test_org_delete_hook(self): + """Test case for org_delete_hook + + Delete a hook # noqa: E501 + """ + pass + + def test_org_delete_label(self): + """Test case for org_delete_label + + Delete a label # noqa: E501 + """ + pass + + def test_org_delete_member(self): + """Test case for org_delete_member + + Remove a member from an organization # noqa: E501 + """ + pass + + def test_org_delete_team(self): + """Test case for org_delete_team + + Delete a team # noqa: E501 + """ + pass + + def test_org_edit(self): + """Test case for org_edit + + Edit an organization # noqa: E501 + """ + pass + + def test_org_edit_hook(self): + """Test case for org_edit_hook + + Update a hook # noqa: E501 + """ + pass + + def test_org_edit_label(self): + """Test case for org_edit_label + + Update a label # noqa: E501 + """ + pass + + def test_org_edit_team(self): + """Test case for org_edit_team + + Edit a team # noqa: E501 + """ + pass + + def test_org_get(self): + """Test case for org_get + + Get an organization # noqa: E501 + """ + pass + + def test_org_get_all(self): + """Test case for org_get_all + + Get list of organizations # noqa: E501 + """ + pass + + def test_org_get_hook(self): + """Test case for org_get_hook + + Get a hook # noqa: E501 + """ + pass + + def test_org_get_label(self): + """Test case for org_get_label + + Get a single label # noqa: E501 + """ + pass + + def test_org_get_team(self): + """Test case for org_get_team + + Get a team # noqa: E501 + """ + pass + + def test_org_is_member(self): + """Test case for org_is_member + + Check if a user is a member of an organization # noqa: E501 + """ + pass + + def test_org_is_public_member(self): + """Test case for org_is_public_member + + Check if a user is a public member of an organization # noqa: E501 + """ + pass + + def test_org_list_current_user_orgs(self): + """Test case for org_list_current_user_orgs + + List the current user's organizations # noqa: E501 + """ + pass + + def test_org_list_hooks(self): + """Test case for org_list_hooks + + List an organization's webhooks # noqa: E501 + """ + pass + + def test_org_list_labels(self): + """Test case for org_list_labels + + List an organization's labels # noqa: E501 + """ + pass + + def test_org_list_members(self): + """Test case for org_list_members + + List an organization's members # noqa: E501 + """ + pass + + def test_org_list_public_members(self): + """Test case for org_list_public_members + + List an organization's public members # noqa: E501 + """ + pass + + def test_org_list_repos(self): + """Test case for org_list_repos + + List an organization's repos # noqa: E501 + """ + pass + + def test_org_list_team_member(self): + """Test case for org_list_team_member + + List a particular member of team # noqa: E501 + """ + pass + + def test_org_list_team_members(self): + """Test case for org_list_team_members + + List a team's members # noqa: E501 + """ + pass + + def test_org_list_team_repos(self): + """Test case for org_list_team_repos + + List a team's repos # noqa: E501 + """ + pass + + def test_org_list_teams(self): + """Test case for org_list_teams + + List an organization's teams # noqa: E501 + """ + pass + + def test_org_list_user_orgs(self): + """Test case for org_list_user_orgs + + List a user's organizations # noqa: E501 + """ + pass + + def test_org_publicize_member(self): + """Test case for org_publicize_member + + Publicize a user's membership # noqa: E501 + """ + pass + + def test_org_remove_team_member(self): + """Test case for org_remove_team_member + + Remove a team member # noqa: E501 + """ + pass + + def test_org_remove_team_repository(self): + """Test case for org_remove_team_repository + + Remove a repository from a team # noqa: E501 + """ + pass + + def test_team_search(self): + """Test case for team_search + + Search for teams within an organization # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payload_commit.py b/test/test_payload_commit.py new file mode 100644 index 0000000..10a568d --- /dev/null +++ b/test/test_payload_commit.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 giteapython +from giteapython.models.payload_commit import PayloadCommit # noqa: E501 +from giteapython.rest import ApiException + + +class TestPayloadCommit(unittest.TestCase): + """PayloadCommit unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPayloadCommit(self): + """Test PayloadCommit""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.payload_commit.PayloadCommit() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payload_commit_verification.py b/test/test_payload_commit_verification.py new file mode 100644 index 0000000..3d5f3ab --- /dev/null +++ b/test/test_payload_commit_verification.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 giteapython +from giteapython.models.payload_commit_verification import PayloadCommitVerification # noqa: E501 +from giteapython.rest import ApiException + + +class TestPayloadCommitVerification(unittest.TestCase): + """PayloadCommitVerification unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPayloadCommitVerification(self): + """Test PayloadCommitVerification""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.payload_commit_verification.PayloadCommitVerification() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payload_user.py b/test/test_payload_user.py new file mode 100644 index 0000000..a722b50 --- /dev/null +++ b/test/test_payload_user.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 giteapython +from giteapython.models.payload_user import PayloadUser # noqa: E501 +from giteapython.rest import ApiException + + +class TestPayloadUser(unittest.TestCase): + """PayloadUser unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPayloadUser(self): + """Test PayloadUser""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.payload_user.PayloadUser() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_permission.py b/test/test_permission.py new file mode 100644 index 0000000..c0e9f9a --- /dev/null +++ b/test/test_permission.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 giteapython +from giteapython.models.permission import Permission # noqa: E501 +from giteapython.rest import ApiException + + +class TestPermission(unittest.TestCase): + """Permission unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPermission(self): + """Test Permission""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.permission.Permission() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pr_branch_info.py b/test/test_pr_branch_info.py new file mode 100644 index 0000000..7b32397 --- /dev/null +++ b/test/test_pr_branch_info.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 giteapython +from giteapython.models.pr_branch_info import PRBranchInfo # noqa: E501 +from giteapython.rest import ApiException + + +class TestPRBranchInfo(unittest.TestCase): + """PRBranchInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPRBranchInfo(self): + """Test PRBranchInfo""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.pr_branch_info.PRBranchInfo() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_public_key.py b/test/test_public_key.py new file mode 100644 index 0000000..65f519f --- /dev/null +++ b/test/test_public_key.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 giteapython +from giteapython.models.public_key import PublicKey # noqa: E501 +from giteapython.rest import ApiException + + +class TestPublicKey(unittest.TestCase): + """PublicKey unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPublicKey(self): + """Test PublicKey""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.public_key.PublicKey() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pull_request.py b/test/test_pull_request.py new file mode 100644 index 0000000..d09eff7 --- /dev/null +++ b/test/test_pull_request.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 giteapython +from giteapython.models.pull_request import PullRequest # noqa: E501 +from giteapython.rest import ApiException + + +class TestPullRequest(unittest.TestCase): + """PullRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPullRequest(self): + """Test PullRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.pull_request.PullRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pull_request_meta.py b/test/test_pull_request_meta.py new file mode 100644 index 0000000..0cf4893 --- /dev/null +++ b/test/test_pull_request_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 giteapython +from giteapython.models.pull_request_meta import PullRequestMeta # noqa: E501 +from giteapython.rest import ApiException + + +class TestPullRequestMeta(unittest.TestCase): + """PullRequestMeta unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPullRequestMeta(self): + """Test PullRequestMeta""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.pull_request_meta.PullRequestMeta() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pull_review.py b/test/test_pull_review.py new file mode 100644 index 0000000..0352fd0 --- /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 giteapython +from giteapython.models.pull_review import PullReview # noqa: E501 +from giteapython.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 = giteapython.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..e70b7dd --- /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 giteapython +from giteapython.models.pull_review_comment import PullReviewComment # noqa: E501 +from giteapython.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 = giteapython.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..0c56318 --- /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 giteapython +from giteapython.models.reaction import Reaction # noqa: E501 +from giteapython.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 = giteapython.models.reaction.Reaction() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_reference.py b/test/test_reference.py new file mode 100644 index 0000000..b0c1251 --- /dev/null +++ b/test/test_reference.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 giteapython +from giteapython.models.reference import Reference # noqa: E501 +from giteapython.rest import ApiException + + +class TestReference(unittest.TestCase): + """Reference unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testReference(self): + """Test Reference""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.reference.Reference() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_release.py b/test/test_release.py new file mode 100644 index 0000000..b0f6ba5 --- /dev/null +++ b/test/test_release.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 giteapython +from giteapython.models.release import Release # noqa: E501 +from giteapython.rest import ApiException + + +class TestRelease(unittest.TestCase): + """Release unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRelease(self): + """Test Release""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.release.Release() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_repo_commit.py b/test/test_repo_commit.py new file mode 100644 index 0000000..b9f0d20 --- /dev/null +++ b/test/test_repo_commit.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 giteapython +from giteapython.models.repo_commit import RepoCommit # noqa: E501 +from giteapython.rest import ApiException + + +class TestRepoCommit(unittest.TestCase): + """RepoCommit unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRepoCommit(self): + """Test RepoCommit""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.repo_commit.RepoCommit() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_repo_topic_options.py b/test/test_repo_topic_options.py new file mode 100644 index 0000000..4f64d07 --- /dev/null +++ b/test/test_repo_topic_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 giteapython +from giteapython.models.repo_topic_options import RepoTopicOptions # noqa: E501 +from giteapython.rest import ApiException + + +class TestRepoTopicOptions(unittest.TestCase): + """RepoTopicOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRepoTopicOptions(self): + """Test RepoTopicOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.repo_topic_options.RepoTopicOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_repository.py b/test/test_repository.py new file mode 100644 index 0000000..84f928e --- /dev/null +++ b/test/test_repository.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 giteapython +from giteapython.models.repository import Repository # noqa: E501 +from giteapython.rest import ApiException + + +class TestRepository(unittest.TestCase): + """Repository unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRepository(self): + """Test Repository""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.repository.Repository() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_repository_api.py b/test/test_repository_api.py new file mode 100644 index 0000000..a560f09 --- /dev/null +++ b/test/test_repository_api.py @@ -0,0 +1,671 @@ +# 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 giteapython +from giteapython.api.repository_api import RepositoryApi # noqa: E501 +from giteapython.rest import ApiException + + +class TestRepositoryApi(unittest.TestCase): + """RepositoryApi unit test stubs""" + + def setUp(self): + self.api = giteapython.api.repository_api.RepositoryApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_current_user_repo(self): + """Test case for create_current_user_repo + + Create a repository # noqa: E501 + """ + pass + + def test_create_fork(self): + """Test case for create_fork + + Fork a repository # noqa: E501 + """ + pass + + def test_get_blob(self): + """Test case for get_blob + + Gets the blob of a repository. # noqa: E501 + """ + pass + + def test_get_tag(self): + """Test case for get_tag + + Gets the tag object of an annotated tag (not lightweight tags) # noqa: E501 + """ + pass + + def test_get_tree(self): + """Test case for get_tree + + Gets the tree of a repository. # noqa: E501 + """ + pass + + def test_list_forks(self): + """Test case for list_forks + + List a repository's forks # noqa: E501 + """ + pass + + def test_repo_add_collaborator(self): + """Test case for repo_add_collaborator + + Add a collaborator to a repository # noqa: E501 + """ + pass + + def test_repo_add_topc(self): + """Test case for repo_add_topc + + Add a topic to a repository # noqa: E501 + """ + pass + + def test_repo_check_collaborator(self): + """Test case for repo_check_collaborator + + Check if a user is a collaborator of a repository # noqa: E501 + """ + pass + + def test_repo_create_branch_protection(self): + """Test case for repo_create_branch_protection + + Create a branch protections for a repository # noqa: E501 + """ + pass + + def test_repo_create_file(self): + """Test case for repo_create_file + + Create a file in a repository # noqa: E501 + """ + pass + + def test_repo_create_hook(self): + """Test case for repo_create_hook + + Create a hook # noqa: E501 + """ + pass + + def test_repo_create_key(self): + """Test case for repo_create_key + + Add a key to a repository # noqa: E501 + """ + pass + + def test_repo_create_pull_request(self): + """Test case for repo_create_pull_request + + Create a pull request # noqa: E501 + """ + pass + + def test_repo_create_pull_review(self): + """Test case for repo_create_pull_review + + Create a review to an pull request # noqa: E501 + """ + pass + + def test_repo_create_release(self): + """Test case for repo_create_release + + Create a release # noqa: E501 + """ + pass + + def test_repo_create_release_attachment(self): + """Test case for repo_create_release_attachment + + Create a release attachment # noqa: E501 + """ + pass + + def test_repo_create_status(self): + """Test case for repo_create_status + + Create a commit status # noqa: E501 + """ + pass + + def test_repo_delete(self): + """Test case for repo_delete + + Delete a repository # noqa: E501 + """ + pass + + def test_repo_delete_branch(self): + """Test case for repo_delete_branch + + Delete a specific branch from a repository # noqa: E501 + """ + pass + + def test_repo_delete_branch_protection(self): + """Test case for repo_delete_branch_protection + + Delete a specific branch protection for the repository # noqa: E501 + """ + pass + + def test_repo_delete_collaborator(self): + """Test case for repo_delete_collaborator + + Delete a collaborator from a repository # noqa: E501 + """ + pass + + def test_repo_delete_file(self): + """Test case for repo_delete_file + + Delete a file in a repository # noqa: E501 + """ + pass + + def test_repo_delete_git_hook(self): + """Test case for repo_delete_git_hook + + Delete a Git hook in a repository # noqa: E501 + """ + pass + + def test_repo_delete_hook(self): + """Test case for repo_delete_hook + + Delete a hook in a repository # noqa: E501 + """ + pass + + def test_repo_delete_key(self): + """Test case for repo_delete_key + + Delete a key from a repository # noqa: E501 + """ + pass + + def test_repo_delete_pull_review(self): + """Test case for repo_delete_pull_review + + Delete a specific review from a pull request # noqa: E501 + """ + pass + + def test_repo_delete_release(self): + """Test case for repo_delete_release + + Delete a release # noqa: E501 + """ + pass + + def test_repo_delete_release_attachment(self): + """Test case for repo_delete_release_attachment + + Delete a release attachment # noqa: E501 + """ + pass + + def test_repo_delete_topic(self): + """Test case for repo_delete_topic + + Delete a topic from a repository # noqa: E501 + """ + pass + + def test_repo_edit(self): + """Test case for repo_edit + + Edit a repository's properties. Only fields that are set will be changed. # noqa: E501 + """ + pass + + def test_repo_edit_branch_protection(self): + """Test case for repo_edit_branch_protection + + Edit a branch protections for a repository. Only fields that are set will be changed # noqa: E501 + """ + pass + + def test_repo_edit_git_hook(self): + """Test case for repo_edit_git_hook + + Edit a Git hook in a repository # noqa: E501 + """ + pass + + def test_repo_edit_hook(self): + """Test case for repo_edit_hook + + Edit a hook in a repository # noqa: E501 + """ + pass + + def test_repo_edit_pull_request(self): + """Test case for repo_edit_pull_request + + Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + """ + pass + + def test_repo_edit_release(self): + """Test case for repo_edit_release + + Update a release # noqa: E501 + """ + pass + + def test_repo_edit_release_attachment(self): + """Test case for repo_edit_release_attachment + + Edit a release attachment # noqa: E501 + """ + pass + + def test_repo_get(self): + """Test case for repo_get + + Get a repository # noqa: E501 + """ + pass + + def test_repo_get_all_commits(self): + """Test case for repo_get_all_commits + + Get a list of all commits from a repository # noqa: E501 + """ + pass + + def test_repo_get_archive(self): + """Test case for repo_get_archive + + Get an archive of a repository # noqa: E501 + """ + pass + + def test_repo_get_branch(self): + """Test case for repo_get_branch + + Retrieve a specific branch from a repository, including its effective branch protection # noqa: E501 + """ + pass + + def test_repo_get_branch_protection(self): + """Test case for repo_get_branch_protection + + Get a specific branch protection for the repository # noqa: E501 + """ + pass + + def test_repo_get_by_id(self): + """Test case for repo_get_by_id + + Get a repository by id # noqa: E501 + """ + pass + + def test_repo_get_combined_status_by_ref(self): + """Test case for repo_get_combined_status_by_ref + + Get a commit's combined status, by branch/tag/commit reference # noqa: E501 + """ + pass + + def test_repo_get_contents(self): + """Test case for repo_get_contents + + Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir # noqa: E501 + """ + pass + + def test_repo_get_contents_list(self): + """Test case for repo_get_contents_list + + Gets the metadata of all the entries of the root dir # noqa: E501 + """ + pass + + def test_repo_get_editor_config(self): + """Test case for repo_get_editor_config + + Get the EditorConfig definitions of a file in a repository # noqa: E501 + """ + pass + + def test_repo_get_git_hook(self): + """Test case for repo_get_git_hook + + Get a Git hook # noqa: E501 + """ + pass + + def test_repo_get_hook(self): + """Test case for repo_get_hook + + Get a hook # noqa: E501 + """ + pass + + def test_repo_get_key(self): + """Test case for repo_get_key + + Get a repository's key by id # noqa: E501 + """ + pass + + def test_repo_get_pull_request(self): + """Test case for repo_get_pull_request + + Get a pull request # noqa: E501 + """ + pass + + def test_repo_get_pull_review(self): + """Test case for repo_get_pull_review + + Get a specific review for a pull request # noqa: E501 + """ + pass + + def test_repo_get_pull_review_comments(self): + """Test case for repo_get_pull_review_comments + + Get a specific review for a pull request # noqa: E501 + """ + pass + + def test_repo_get_raw_file(self): + """Test case for repo_get_raw_file + + Get a file from a repository # noqa: E501 + """ + pass + + def test_repo_get_release(self): + """Test case for repo_get_release + + Get a release # noqa: E501 + """ + pass + + def test_repo_get_release_attachment(self): + """Test case for repo_get_release_attachment + + Get a release attachment # noqa: E501 + """ + pass + + def test_repo_get_single_commit(self): + """Test case for repo_get_single_commit + + Get a single commit from a repository # noqa: E501 + """ + pass + + def test_repo_list_all_git_refs(self): + """Test case for repo_list_all_git_refs + + Get specified ref or filtered repository's refs # noqa: E501 + """ + pass + + def test_repo_list_branch_protection(self): + """Test case for repo_list_branch_protection + + List branch protections for a repository # noqa: E501 + """ + pass + + def test_repo_list_branches(self): + """Test case for repo_list_branches + + List a repository's branches # noqa: E501 + """ + pass + + def test_repo_list_collaborators(self): + """Test case for repo_list_collaborators + + List a repository's collaborators # noqa: E501 + """ + pass + + def test_repo_list_git_hooks(self): + """Test case for repo_list_git_hooks + + List the Git hooks in a repository # noqa: E501 + """ + pass + + def test_repo_list_git_refs(self): + """Test case for repo_list_git_refs + + Get specified ref or filtered repository's refs # noqa: E501 + """ + pass + + def test_repo_list_hooks(self): + """Test case for repo_list_hooks + + List the hooks in a repository # noqa: E501 + """ + pass + + def test_repo_list_keys(self): + """Test case for repo_list_keys + + List a repository's keys # noqa: E501 + """ + pass + + def test_repo_list_pull_requests(self): + """Test case for repo_list_pull_requests + + List a repo's pull requests # noqa: E501 + """ + pass + + def test_repo_list_pull_reviews(self): + """Test case for repo_list_pull_reviews + + List all reviews for a pull request # noqa: E501 + """ + pass + + def test_repo_list_release_attachments(self): + """Test case for repo_list_release_attachments + + List release's attachments # noqa: E501 + """ + pass + + def test_repo_list_releases(self): + """Test case for repo_list_releases + + List a repo's releases # noqa: E501 + """ + pass + + def test_repo_list_stargazers(self): + """Test case for repo_list_stargazers + + List a repo's stargazers # noqa: E501 + """ + pass + + def test_repo_list_statuses(self): + """Test case for repo_list_statuses + + Get a commit's statuses # noqa: E501 + """ + pass + + def test_repo_list_subscribers(self): + """Test case for repo_list_subscribers + + List a repo's watchers # noqa: E501 + """ + pass + + def test_repo_list_tags(self): + """Test case for repo_list_tags + + List a repository's tags # noqa: E501 + """ + pass + + def test_repo_list_topics(self): + """Test case for repo_list_topics + + Get list of topics that a repository has # noqa: E501 + """ + pass + + def test_repo_merge_pull_request(self): + """Test case for repo_merge_pull_request + + Merge a pull request # noqa: E501 + """ + pass + + def test_repo_migrate(self): + """Test case for repo_migrate + + Migrate a remote git repository # noqa: E501 + """ + pass + + def test_repo_mirror_sync(self): + """Test case for repo_mirror_sync + + Sync a mirrored repository # noqa: E501 + """ + pass + + def test_repo_pull_request_is_merged(self): + """Test case for repo_pull_request_is_merged + + Check if a pull request has been merged # noqa: E501 + """ + pass + + def test_repo_search(self): + """Test case for repo_search + + Search for repositories # noqa: E501 + """ + pass + + def test_repo_signing_key(self): + """Test case for repo_signing_key + + Get signing-key.gpg for given repository # noqa: E501 + """ + pass + + def test_repo_submit_pull_review(self): + """Test case for repo_submit_pull_review + + Submit a pending review to an pull request # noqa: E501 + """ + pass + + def test_repo_test_hook(self): + """Test case for repo_test_hook + + Test a push webhook # noqa: E501 + """ + pass + + def test_repo_tracked_times(self): + """Test case for repo_tracked_times + + List a repo's tracked times # noqa: E501 + """ + pass + + def test_repo_transfer(self): + """Test case for repo_transfer + + Transfer a repo ownership # noqa: E501 + """ + pass + + def test_repo_update_file(self): + """Test case for repo_update_file + + Update a file in a repository # noqa: E501 + """ + pass + + def test_repo_update_topics(self): + """Test case for repo_update_topics + + Replace list of topics for a repository # noqa: E501 + """ + pass + + def test_topic_search(self): + """Test case for topic_search + + search topics via keyword # noqa: E501 + """ + pass + + def test_user_current_check_subscription(self): + """Test case for user_current_check_subscription + + Check if the current user is watching a repo # noqa: E501 + """ + pass + + def test_user_current_delete_subscription(self): + """Test case for user_current_delete_subscription + + Unwatch a repo # noqa: E501 + """ + pass + + def test_user_current_put_subscription(self): + """Test case for user_current_put_subscription + + Watch a repo # noqa: E501 + """ + pass + + def test_user_tracked_times(self): + """Test case for user_tracked_times + + List a user's tracked times in a repo # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_repository_meta.py b/test/test_repository_meta.py new file mode 100644 index 0000000..02b160d --- /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 giteapython +from giteapython.models.repository_meta import RepositoryMeta # noqa: E501 +from giteapython.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 = giteapython.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..40422ab --- /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 giteapython +from giteapython.models.review_state_type import ReviewStateType # noqa: E501 +from giteapython.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 = giteapython.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 new file mode 100644 index 0000000..3100225 --- /dev/null +++ b/test/test_search_results.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 giteapython +from giteapython.models.search_results import SearchResults # noqa: E501 +from giteapython.rest import ApiException + + +class TestSearchResults(unittest.TestCase): + """SearchResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSearchResults(self): + """Test SearchResults""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.search_results.SearchResults() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_server_version.py b/test/test_server_version.py new file mode 100644 index 0000000..a1240c8 --- /dev/null +++ b/test/test_server_version.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 giteapython +from giteapython.models.server_version import ServerVersion # noqa: E501 +from giteapython.rest import ApiException + + +class TestServerVersion(unittest.TestCase): + """ServerVersion unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testServerVersion(self): + """Test ServerVersion""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.server_version.ServerVersion() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_state_type.py b/test/test_state_type.py new file mode 100644 index 0000000..cb4e566 --- /dev/null +++ b/test/test_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 giteapython +from giteapython.models.state_type import StateType # noqa: E501 +from giteapython.rest import ApiException + + +class TestStateType(unittest.TestCase): + """StateType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStateType(self): + """Test StateType""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.state_type.StateType() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_status.py b/test/test_status.py new file mode 100644 index 0000000..91ed063 --- /dev/null +++ b/test/test_status.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 giteapython +from giteapython.models.status import Status # noqa: E501 +from giteapython.rest import ApiException + + +class TestStatus(unittest.TestCase): + """Status unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStatus(self): + """Test Status""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.status.Status() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_status_state.py b/test/test_status_state.py new file mode 100644 index 0000000..a88bd48 --- /dev/null +++ b/test/test_status_state.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 giteapython +from giteapython.models.status_state import StatusState # noqa: E501 +from giteapython.rest import ApiException + + +class TestStatusState(unittest.TestCase): + """StatusState unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStatusState(self): + """Test StatusState""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.status_state.StatusState() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_stop_watch.py b/test/test_stop_watch.py new file mode 100644 index 0000000..54a387a --- /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 giteapython +from giteapython.models.stop_watch import StopWatch # noqa: E501 +from giteapython.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 = giteapython.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..6f9a7a9 --- /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 giteapython +from giteapython.models.submit_pull_review_options import SubmitPullReviewOptions # noqa: E501 +from giteapython.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 = giteapython.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 new file mode 100644 index 0000000..82f1bc3 --- /dev/null +++ b/test/test_tag.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 giteapython +from giteapython.models.tag import Tag # noqa: E501 +from giteapython.rest import ApiException + + +class TestTag(unittest.TestCase): + """Tag unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTag(self): + """Test Tag""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.tag.Tag() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_team.py b/test/test_team.py new file mode 100644 index 0000000..f682ca5 --- /dev/null +++ b/test/test_team.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 giteapython +from giteapython.models.team import Team # noqa: E501 +from giteapython.rest import ApiException + + +class TestTeam(unittest.TestCase): + """Team unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTeam(self): + """Test Team""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.team.Team() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_time_stamp.py b/test/test_time_stamp.py new file mode 100644 index 0000000..0606729 --- /dev/null +++ b/test/test_time_stamp.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 giteapython +from giteapython.models.time_stamp import TimeStamp # noqa: E501 +from giteapython.rest import ApiException + + +class TestTimeStamp(unittest.TestCase): + """TimeStamp unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTimeStamp(self): + """Test TimeStamp""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.time_stamp.TimeStamp() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_topic_name.py b/test/test_topic_name.py new file mode 100644 index 0000000..58a637e --- /dev/null +++ b/test/test_topic_name.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 giteapython +from giteapython.models.topic_name import TopicName # noqa: E501 +from giteapython.rest import ApiException + + +class TestTopicName(unittest.TestCase): + """TopicName unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTopicName(self): + """Test TopicName""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.topic_name.TopicName() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_topic_response.py b/test/test_topic_response.py new file mode 100644 index 0000000..e4f7344 --- /dev/null +++ b/test/test_topic_response.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 giteapython +from giteapython.models.topic_response import TopicResponse # noqa: E501 +from giteapython.rest import ApiException + + +class TestTopicResponse(unittest.TestCase): + """TopicResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTopicResponse(self): + """Test TopicResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.topic_response.TopicResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tracked_time.py b/test/test_tracked_time.py new file mode 100644 index 0000000..1dce011 --- /dev/null +++ b/test/test_tracked_time.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 giteapython +from giteapython.models.tracked_time import TrackedTime # noqa: E501 +from giteapython.rest import ApiException + + +class TestTrackedTime(unittest.TestCase): + """TrackedTime unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTrackedTime(self): + """Test TrackedTime""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.tracked_time.TrackedTime() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_transfer_repo_option.py b/test/test_transfer_repo_option.py new file mode 100644 index 0000000..ecf9b4d --- /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 giteapython +from giteapython.models.transfer_repo_option import TransferRepoOption # noqa: E501 +from giteapython.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 = giteapython.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 new file mode 100644 index 0000000..87bf534 --- /dev/null +++ b/test/test_update_file_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 giteapython +from giteapython.models.update_file_options import UpdateFileOptions # noqa: E501 +from giteapython.rest import ApiException + + +class TestUpdateFileOptions(unittest.TestCase): + """UpdateFileOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUpdateFileOptions(self): + """Test UpdateFileOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.update_file_options.UpdateFileOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user.py b/test/test_user.py new file mode 100644 index 0000000..c404206 --- /dev/null +++ b/test/test_user.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 giteapython +from giteapython.models.user import User # noqa: E501 +from giteapython.rest import ApiException + + +class TestUser(unittest.TestCase): + """User unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUser(self): + """Test User""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.user.User() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_api.py b/test/test_user_api.py new file mode 100644 index 0000000..9f828de --- /dev/null +++ b/test/test_user_api.py @@ -0,0 +1,356 @@ +# 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 giteapython +from giteapython.api.user_api import UserApi # noqa: E501 +from giteapython.rest import ApiException + + +class TestUserApi(unittest.TestCase): + """UserApi unit test stubs""" + + def setUp(self): + self.api = giteapython.api.user_api.UserApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_current_user_repo(self): + """Test case for create_current_user_repo + + Create a repository # noqa: E501 + """ + pass + + def test_user_add_email(self): + """Test case for user_add_email + + Add email addresses # noqa: E501 + """ + pass + + def test_user_check_following(self): + """Test case for user_check_following + + Check if one user is following another user # noqa: E501 + """ + pass + + def test_user_create_o_auth2_application(self): + """Test case for user_create_o_auth2_application + + creates a new OAuth2 application # noqa: E501 + """ + pass + + def test_user_create_token(self): + """Test case for user_create_token + + Create an access token # noqa: E501 + """ + pass + + def test_user_current_check_following(self): + """Test case for user_current_check_following + + Check whether a user is followed by the authenticated user # noqa: E501 + """ + pass + + def test_user_current_check_starring(self): + """Test case for user_current_check_starring + + Whether the authenticated is starring the repo # noqa: E501 + """ + pass + + def test_user_current_delete_follow(self): + """Test case for user_current_delete_follow + + Unfollow a user # noqa: E501 + """ + pass + + def test_user_current_delete_gpg_key(self): + """Test case for user_current_delete_gpg_key + + Remove a GPG key # noqa: E501 + """ + pass + + def test_user_current_delete_key(self): + """Test case for user_current_delete_key + + Delete a public key # noqa: E501 + """ + pass + + def test_user_current_delete_star(self): + """Test case for user_current_delete_star + + Unstar the given repo # noqa: E501 + """ + pass + + def test_user_current_get_gpg_key(self): + """Test case for user_current_get_gpg_key + + Get a GPG key # noqa: E501 + """ + pass + + def test_user_current_get_key(self): + """Test case for user_current_get_key + + Get a public key # noqa: E501 + """ + pass + + def test_user_current_list_followers(self): + """Test case for user_current_list_followers + + List the authenticated user's followers # noqa: E501 + """ + pass + + def test_user_current_list_following(self): + """Test case for user_current_list_following + + List the users that the authenticated user is following # noqa: E501 + """ + pass + + def test_user_current_list_gpg_keys(self): + """Test case for user_current_list_gpg_keys + + List the authenticated user's GPG keys # noqa: E501 + """ + pass + + def test_user_current_list_keys(self): + """Test case for user_current_list_keys + + List the authenticated user's public keys # noqa: E501 + """ + pass + + def test_user_current_list_repos(self): + """Test case for user_current_list_repos + + List the repos that the authenticated user owns or has access to # noqa: E501 + """ + pass + + def test_user_current_list_starred(self): + """Test case for user_current_list_starred + + The repos that the authenticated user has starred # noqa: E501 + """ + pass + + def test_user_current_list_subscriptions(self): + """Test case for user_current_list_subscriptions + + List repositories watched by the authenticated user # noqa: E501 + """ + pass + + def test_user_current_post_gpg_key(self): + """Test case for user_current_post_gpg_key + + Create a GPG key # noqa: E501 + """ + pass + + def test_user_current_post_key(self): + """Test case for user_current_post_key + + Create a public key # noqa: E501 + """ + pass + + def test_user_current_put_follow(self): + """Test case for user_current_put_follow + + Follow a user # noqa: E501 + """ + pass + + def test_user_current_put_star(self): + """Test case for user_current_put_star + + Star the given repo # noqa: E501 + """ + pass + + def test_user_current_tracked_times(self): + """Test case for user_current_tracked_times + + List the current user's tracked times # noqa: E501 + """ + pass + + def test_user_delete_access_token(self): + """Test case for user_delete_access_token + + delete an access token # noqa: E501 + """ + pass + + def test_user_delete_email(self): + """Test case for user_delete_email + + Delete email addresses # noqa: E501 + """ + pass + + def test_user_delete_o_auth2_application(self): + """Test case for user_delete_o_auth2_application + + delete an OAuth2 Application # noqa: E501 + """ + pass + + def test_user_get(self): + """Test case for user_get + + Get a user # noqa: E501 + """ + pass + + def test_user_get_current(self): + """Test case for user_get_current + + Get the authenticated user # noqa: E501 + """ + pass + + def test_user_get_heatmap_data(self): + """Test case for user_get_heatmap_data + + Get a user's heatmap # noqa: E501 + """ + pass + + def test_user_get_o_auth2_application(self): + """Test case for user_get_o_auth2_application + + get an OAuth2 Application # noqa: E501 + """ + pass + + def test_user_get_oauth2_application(self): + """Test case for user_get_oauth2_application + + List the authenticated user's oauth2 applications # noqa: E501 + """ + pass + + def test_user_get_stop_watches(self): + """Test case for user_get_stop_watches + + Get list of all existing stopwatches # noqa: E501 + """ + pass + + def test_user_get_tokens(self): + """Test case for user_get_tokens + + List the authenticated user's access tokens # noqa: E501 + """ + pass + + def test_user_list_emails(self): + """Test case for user_list_emails + + List the authenticated user's email addresses # noqa: E501 + """ + pass + + def test_user_list_followers(self): + """Test case for user_list_followers + + List the given user's followers # noqa: E501 + """ + pass + + def test_user_list_following(self): + """Test case for user_list_following + + List the users that the given user is following # noqa: E501 + """ + pass + + def test_user_list_gpg_keys(self): + """Test case for user_list_gpg_keys + + List the given user's GPG keys # noqa: E501 + """ + pass + + def test_user_list_keys(self): + """Test case for user_list_keys + + List the given user's public keys # noqa: E501 + """ + pass + + def test_user_list_repos(self): + """Test case for user_list_repos + + List the repos owned by the given user # noqa: E501 + """ + pass + + def test_user_list_starred(self): + """Test case for user_list_starred + + The repos that the given user has starred # noqa: E501 + """ + pass + + def test_user_list_subscriptions(self): + """Test case for user_list_subscriptions + + List the repositories watched by a user # noqa: E501 + """ + pass + + def test_user_list_teams(self): + """Test case for user_list_teams + + List all the teams a user belongs to # noqa: E501 + """ + pass + + def test_user_search(self): + """Test case for user_search + + Search for users # noqa: E501 + """ + pass + + def test_user_update_o_auth2_application(self): + """Test case for user_update_o_auth2_application + + update an OAuth2 Application, this includes regenerating the client secret # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_heatmap_data.py b/test/test_user_heatmap_data.py new file mode 100644 index 0000000..938080a --- /dev/null +++ b/test/test_user_heatmap_data.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 giteapython +from giteapython.models.user_heatmap_data import UserHeatmapData # noqa: E501 +from giteapython.rest import ApiException + + +class TestUserHeatmapData(unittest.TestCase): + """UserHeatmapData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserHeatmapData(self): + """Test UserHeatmapData""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.user_heatmap_data.UserHeatmapData() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_watch_info.py b/test/test_watch_info.py new file mode 100644 index 0000000..af49d58 --- /dev/null +++ b/test/test_watch_info.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 giteapython +from giteapython.models.watch_info import WatchInfo # noqa: E501 +from giteapython.rest import ApiException + + +class TestWatchInfo(unittest.TestCase): + """WatchInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testWatchInfo(self): + """Test WatchInfo""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapython.models.watch_info.WatchInfo() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..3d0be61 --- /dev/null +++ b/tox.ini @@ -0,0 +1,10 @@ +[tox] +envlist = py27, py3 + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + nosetests \ + []