giteapython/docs/RepositoryApi.md

307 KiB
Raw Blame History

giteapython.RepositoryApi

All URIs are relative to http://localhost/api/v1

Method HTTP request Description
create_current_user_repo POST /user/repos Create a repository
create_fork POST /repos/{owner}/{repo}/forks Fork a repository
get_blob GET /repos/{owner}/{repo}/git/blobs/{sha} Gets the blob of a repository.
get_tag GET /repos/{owner}/{repo}/git/tags/{sha} Gets the tag object of an annotated tag (not lightweight tags)
get_tree GET /repos/{owner}/{repo}/git/trees/{sha} Gets the tree of a repository.
list_forks GET /repos/{owner}/{repo}/forks List a repository's forks
repo_add_collaborator PUT /repos/{owner}/{repo}/collaborators/{collaborator} Add a collaborator to a repository
repo_add_topc PUT /repos/{owner}/{repo}/topics/{topic} Add a topic to a repository
repo_check_collaborator GET /repos/{owner}/{repo}/collaborators/{collaborator} Check if a user is a collaborator of a repository
repo_create_branch_protection POST /repos/{owner}/{repo}/branch_protections Create a branch protections for a repository
repo_create_file POST /repos/{owner}/{repo}/contents/{filepath} Create a file in a repository
repo_create_hook POST /repos/{owner}/{repo}/hooks Create a hook
repo_create_key POST /repos/{owner}/{repo}/keys Add a key to a repository
repo_create_pull_request POST /repos/{owner}/{repo}/pulls Create a pull request
repo_create_pull_review POST /repos/{owner}/{repo}/pulls/{index}/reviews Create a review to an pull request
repo_create_release POST /repos/{owner}/{repo}/releases Create a release
repo_create_release_attachment POST /repos/{owner}/{repo}/releases/{id}/assets Create a release attachment
repo_create_status POST /repos/{owner}/{repo}/statuses/{sha} Create a commit status
repo_delete DELETE /repos/{owner}/{repo} Delete a repository
repo_delete_branch DELETE /repos/{owner}/{repo}/branches/{branch} Delete a specific branch from a repository
repo_delete_branch_protection DELETE /repos/{owner}/{repo}/branch_protections/{name} Delete a specific branch protection for the repository
repo_delete_collaborator DELETE /repos/{owner}/{repo}/collaborators/{collaborator} Delete a collaborator from a repository
repo_delete_file DELETE /repos/{owner}/{repo}/contents/{filepath} Delete a file in a repository
repo_delete_git_hook DELETE /repos/{owner}/{repo}/hooks/git/{id} Delete a Git hook in a repository
repo_delete_hook DELETE /repos/{owner}/{repo}/hooks/{id} Delete a hook in a repository
repo_delete_key DELETE /repos/{owner}/{repo}/keys/{id} Delete a key from a repository
repo_delete_pull_review DELETE /repos/{owner}/{repo}/pulls/{index}/reviews/{id} Delete a specific review from a pull request
repo_delete_release DELETE /repos/{owner}/{repo}/releases/{id} Delete a release
repo_delete_release_attachment DELETE /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} Delete a release attachment
repo_delete_topic DELETE /repos/{owner}/{repo}/topics/{topic} Delete a topic from a repository
repo_edit PATCH /repos/{owner}/{repo} Edit a repository's properties. Only fields that are set will be changed.
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 PATCH /repos/{owner}/{repo}/hooks/git/{id} Edit a Git hook in a repository
repo_edit_hook PATCH /repos/{owner}/{repo}/hooks/{id} Edit a hook in a repository
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 PATCH /repos/{owner}/{repo}/releases/{id} Update a release
repo_edit_release_attachment PATCH /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} Edit a release attachment
repo_get GET /repos/{owner}/{repo} Get a repository
repo_get_all_commits GET /repos/{owner}/{repo}/commits Get a list of all commits from a repository
repo_get_archive GET /repos/{owner}/{repo}/archive/{archive} Get an archive of a repository
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 GET /repos/{owner}/{repo}/branch_protections/{name} Get a specific branch protection for the repository
repo_get_by_id GET /repositories/{id} Get a repository by id
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 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 GET /repos/{owner}/{repo}/contents Gets the metadata of all the entries of the root dir
repo_get_editor_config GET /repos/{owner}/{repo}/editorconfig/{filepath} Get the EditorConfig definitions of a file in a repository
repo_get_git_hook GET /repos/{owner}/{repo}/hooks/git/{id} Get a Git hook
repo_get_hook GET /repos/{owner}/{repo}/hooks/{id} Get a hook
repo_get_key GET /repos/{owner}/{repo}/keys/{id} Get a repository's key by id
repo_get_pull_request GET /repos/{owner}/{repo}/pulls/{index} Get a pull request
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 GET /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments Get a specific review for a pull request
repo_get_raw_file GET /repos/{owner}/{repo}/raw/{filepath} Get a file from a repository
repo_get_release GET /repos/{owner}/{repo}/releases/{id} Get a release
repo_get_release_attachment GET /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} Get a release attachment
repo_get_single_commit GET /repos/{owner}/{repo}/git/commits/{sha} Get a single commit from a repository
repo_list_all_git_refs GET /repos/{owner}/{repo}/git/refs Get specified ref or filtered repository's refs
repo_list_branch_protection GET /repos/{owner}/{repo}/branch_protections List branch protections for a repository
repo_list_branches GET /repos/{owner}/{repo}/branches List a repository's branches
repo_list_collaborators GET /repos/{owner}/{repo}/collaborators List a repository's collaborators
repo_list_git_hooks GET /repos/{owner}/{repo}/hooks/git List the Git hooks in a repository
repo_list_git_refs GET /repos/{owner}/{repo}/git/refs/{ref} Get specified ref or filtered repository's refs
repo_list_hooks GET /repos/{owner}/{repo}/hooks List the hooks in a repository
repo_list_keys GET /repos/{owner}/{repo}/keys List a repository's keys
repo_list_pull_requests GET /repos/{owner}/{repo}/pulls List a repo's pull requests
repo_list_pull_reviews GET /repos/{owner}/{repo}/pulls/{index}/reviews List all reviews for a pull request
repo_list_release_attachments GET /repos/{owner}/{repo}/releases/{id}/assets List release's attachments
repo_list_releases GET /repos/{owner}/{repo}/releases List a repo's releases
repo_list_stargazers GET /repos/{owner}/{repo}/stargazers List a repo's stargazers
repo_list_statuses GET /repos/{owner}/{repo}/statuses/{sha} Get a commit's statuses
repo_list_subscribers GET /repos/{owner}/{repo}/subscribers List a repo's watchers
repo_list_tags GET /repos/{owner}/{repo}/tags List a repository's tags
repo_list_topics GET /repos/{owner}/{repo}/topics Get list of topics that a repository has
repo_merge_pull_request POST /repos/{owner}/{repo}/pulls/{index}/merge Merge a pull request
repo_migrate POST /repos/migrate Migrate a remote git repository
repo_mirror_sync POST /repos/{owner}/{repo}/mirror-sync Sync a mirrored repository
repo_pull_request_is_merged GET /repos/{owner}/{repo}/pulls/{index}/merge Check if a pull request has been merged
repo_search GET /repos/search Search for repositories
repo_signing_key GET /repos/{owner}/{repo}/signing-key.gpg Get signing-key.gpg for given repository
repo_submit_pull_review POST /repos/{owner}/{repo}/pulls/{index}/reviews/{id} Submit a pending review to an pull request
repo_test_hook POST /repos/{owner}/{repo}/hooks/{id}/tests Test a push webhook
repo_tracked_times GET /repos/{owner}/{repo}/times List a repo's tracked times
repo_transfer POST /repos/{owner}/{repo}/transfer Transfer a repo ownership
repo_update_file PUT /repos/{owner}/{repo}/contents/{filepath} Update a file in a repository
repo_update_topics PUT /repos/{owner}/{repo}/topics Replace list of topics for a repository
topic_search GET /topics/search search topics via keyword
user_current_check_subscription GET /repos/{owner}/{repo}/subscription Check if the current user is watching a repo
user_current_delete_subscription DELETE /repos/{owner}/{repo}/subscription Unwatch a repo
user_current_put_subscription PUT /repos/{owner}/{repo}/subscription Watch a repo
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

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 [optional]

Return type

Repository

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_fork

Repository create_fork(owner, repo, body=body)

Fork a repository

Example

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 [optional]

Return type

Repository

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_blob

GitBlobResponse get_blob(owner, repo, sha)

Gets the blob of a repository.

Example

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

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_tag

AnnotatedTag get_tag(owner, repo, sha)

Gets the tag object of an annotated tag (not lightweight tags)

Example

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

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_tree

GitTreeResponse get_tree(owner, repo, sha, recursive=recursive, page=page, per_page=per_page)

Gets the tree of a repository.

Example

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

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_forks

list[Repository] list_forks(owner, repo, page=page, limit=limit)

List a repository's forks

Example

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]**

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_add_collaborator

repo_add_collaborator(owner, repo, collaborator, body=body)

Add a collaborator to a repository

Example

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 [optional]

Return type

void (empty response body)

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_add_topc

repo_add_topc(owner, repo, topic)

Add a topic to a repository

Example

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, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_check_collaborator

repo_check_collaborator(owner, repo, collaborator)

Check if a user is a collaborator of a repository

Example

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, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_create_branch_protection

BranchProtection repo_create_branch_protection(owner, repo, body=body)

Create a branch protections for a repository

Example

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 [optional]

Return type

BranchProtection

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_create_file

FileResponse repo_create_file(owner, repo, filepath, body)

Create a file in a repository

Example

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

Return type

FileResponse

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_create_hook

Hook repo_create_hook(owner, repo, body=body)

Create a hook

Example

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 [optional]

Return type

Hook

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_create_key

DeployKey repo_create_key(owner, repo, body=body)

Add a key to a repository

Example

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 [optional]

Return type

DeployKey

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_create_pull_request

PullRequest repo_create_pull_request(owner, repo, body=body)

Create a pull request

Example

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 [optional]

Return type

PullRequest

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_create_pull_review

PullReview repo_create_pull_review(owner, repo, index, body)

Create a review to an pull request

Example

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

Return type

PullReview

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_create_release

Release repo_create_release(owner, repo, body=body)

Create a release

Example

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 [optional]

Return type

Release

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_create_release_attachment

Attachment repo_create_release_attachment(owner, repo, id, attachment, name=name)

Create a release attachment

Example

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

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_create_status

Status repo_create_status(owner, repo, sha, body=body)

Create a commit status

Example

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 [optional]

Return type

Status

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_delete

repo_delete(owner, repo)

Delete a repository

Example

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, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_delete_branch

repo_delete_branch(owner, repo, branch)

Delete a specific branch from a repository

Example

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, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_delete_branch_protection

repo_delete_branch_protection(owner, repo, name)

Delete a specific branch protection for the repository

Example

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, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_delete_collaborator

repo_delete_collaborator(owner, repo, collaborator)

Delete a collaborator from a repository

Example

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, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_delete_file

FileDeleteResponse repo_delete_file(owner, repo, filepath, body)

Delete a file in a repository

Example

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

Return type

FileDeleteResponse

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_delete_git_hook

repo_delete_git_hook(owner, repo, id)

Delete a Git hook in a repository

Example

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, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_delete_hook

repo_delete_hook(owner, repo, id)

Delete a hook in a repository

Example

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, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_delete_key

repo_delete_key(owner, repo, id)

Delete a key from a repository

Example

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, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json, text/html

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_delete_pull_review

repo_delete_pull_review(owner, repo, index, id)

Delete a specific review from a pull request

Example

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, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_delete_release

repo_delete_release(owner, repo, id)

Delete a release

Example

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, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json, text/html

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_delete_release_attachment

repo_delete_release_attachment(owner, repo, id, attachment_id)

Delete a release attachment

Example

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, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_delete_topic

repo_delete_topic(owner, repo, topic)

Delete a topic from a repository

Example

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, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_edit

Repository repo_edit(owner, repo, body=body)

Edit a repository's properties. Only fields that are set will be changed.

Example

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 Properties of a repo that you can edit [optional]

Return type

Repository

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

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

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 [optional]

Return type

BranchProtection

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_edit_git_hook

GitHook repo_edit_git_hook(owner, repo, id, body=body)

Edit a Git hook in a repository

Example

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 [optional]

Return type

GitHook

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_edit_hook

Hook repo_edit_hook(owner, repo, id, body=body)

Edit a hook in a repository

Example

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 [optional]

Return type

Hook

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

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

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 [optional]

Return type

PullRequest

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_edit_release

Release repo_edit_release(owner, repo, id, body=body)

Update a release

Example

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 [optional]

Return type

Release

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_edit_release_attachment

Attachment repo_edit_release_attachment(owner, repo, id, attachment_id, body=body)

Edit a release attachment

Example

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 [optional]

Return type

Attachment

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_get

Repository repo_get(owner, repo)

Get a repository

Example

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

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

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

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]**

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_get_archive

repo_get_archive(owner, repo, archive)

Get an archive of a repository

Example

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, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_get_branch

Branch repo_get_branch(owner, repo, branch)

Retrieve a specific branch from a repository, including its effective branch protection

Example

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

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_get_branch_protection

BranchProtection repo_get_branch_protection(owner, repo, name)

Get a specific branch protection for the repository

Example

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

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_get_by_id

Repository repo_get_by_id(id)

Get a repository by id

Example

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

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

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

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

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

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

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 repositorys 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 repositorys default branch (usually master) [optional]

Return type

ContentsResponse

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

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

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 repositorys 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 repositorys default branch (usually master) [optional]

Return type

**list[ContentsResponse]**

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_get_editor_config

repo_get_editor_config(owner, repo, filepath)

Get the EditorConfig definitions of a file in a repository

Example

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, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_get_git_hook

GitHook repo_get_git_hook(owner, repo, id)

Get a Git hook

Example

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

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_get_hook

Hook repo_get_hook(owner, repo, id)

Get a hook

Example

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

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_get_key

DeployKey repo_get_key(owner, repo, id)

Get a repository's key by id

Example

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

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_get_pull_request

PullRequest repo_get_pull_request(owner, repo, index)

Get a pull request

Example

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

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_get_pull_review

PullReview repo_get_pull_review(owner, repo, index, id)

Get a specific review for a pull request

Example

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

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

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

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]**

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_get_raw_file

repo_get_raw_file(owner, repo, filepath)

Get a file from a repository

Example

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, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_get_release

Release repo_get_release(owner, repo, id)

Get a release

Example

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

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_get_release_attachment

Attachment repo_get_release_attachment(owner, repo, id, attachment_id)

Get a release attachment

Example

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

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_get_single_commit

Commit repo_get_single_commit(owner, repo, sha)

Get a single commit from a repository

Example

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

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_list_all_git_refs

list[Reference] repo_list_all_git_refs(owner, repo)

Get specified ref or filtered repository's refs

Example

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]**

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_list_branch_protection

list[BranchProtection] repo_list_branch_protection(owner, repo)

List branch protections for a repository

Example

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]**

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_list_branches

list[Branch] repo_list_branches(owner, repo)

List a repository's branches

Example

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]**

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_list_collaborators

list[User] repo_list_collaborators(owner, repo, page=page, limit=limit)

List a repository's collaborators

Example

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]**

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_list_git_hooks

list[GitHook] repo_list_git_hooks(owner, repo)

List the Git hooks in a repository

Example

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]**

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_list_git_refs

list[Reference] repo_list_git_refs(owner, repo, ref)

Get specified ref or filtered repository's refs

Example

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]**

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_list_hooks

list[Hook] repo_list_hooks(owner, repo, page=page, limit=limit)

List the hooks in a repository

Example

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]**

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

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

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]**

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

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

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]** 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]**

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

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

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]**

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_list_release_attachments

list[Attachment] repo_list_release_attachments(owner, repo, id)

List release's attachments

Example

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]**

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_list_releases

list[Release] repo_list_releases(owner, repo, per_page=per_page, page=page, limit=limit)

List a repo's releases

Example

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]**

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_list_stargazers

list[User] repo_list_stargazers(owner, repo, page=page, limit=limit)

List a repo's stargazers

Example

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]**

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

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

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]**

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_list_subscribers

list[User] repo_list_subscribers(owner, repo, page=page, limit=limit)

List a repo's watchers

Example

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]**

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_list_tags

list[Tag] repo_list_tags(owner, repo, page=page, limit=limit)

List a repository's tags

Example

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]**

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_list_topics

TopicName repo_list_topics(owner, repo, page=page, limit=limit)

Get list of topics that a repository has

Example

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

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_merge_pull_request

repo_merge_pull_request(owner, repo, index, body=body)

Merge a pull request

Example

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 [optional]

Return type

void (empty response body)

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_migrate

Repository repo_migrate(body=body)

Migrate a remote git repository

Example

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 [optional]

Return type

Repository

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_mirror_sync

repo_mirror_sync(owner, repo)

Sync a mirrored repository

Example

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, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_pull_request_is_merged

repo_pull_request_is_merged(owner, repo, index)

Check if a pull request has been merged

Example

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, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

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

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

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_signing_key

str repo_signing_key(owner, repo)

Get signing-key.gpg for given repository

Example

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, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: text/plain

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_submit_pull_review

PullReview repo_submit_pull_review(owner, repo, index, id, body)

Submit a pending review to an pull request

Example

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

Return type

PullReview

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_test_hook

repo_test_hook(owner, repo, id)

Test a push webhook

Example

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, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

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

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]**

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_transfer

Repository repo_transfer(owner, repo, body)

Transfer a repo ownership

Example

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 Transfer Options

Return type

Repository

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_update_file

FileResponse repo_update_file(owner, repo, filepath, body)

Update a file in a repository

Example

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

Return type

FileResponse

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repo_update_topics

repo_update_topics(owner, repo, body=body)

Replace list of topics for a repository

Example

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 [optional]

Return type

void (empty response body)

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

topic_search

list[TopicResponse] topic_search(q, page=page, limit=limit)

search topics via keyword

Example

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]**

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

user_current_check_subscription

WatchInfo user_current_check_subscription(owner, repo)

Check if the current user is watching a repo

Example

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

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json, text/html

[Back to top] [Back to API list] [Back to Model list] [Back to README]

user_current_delete_subscription

user_current_delete_subscription(owner, repo)

Unwatch a repo

Example

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, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json, text/html

[Back to top] [Back to API list] [Back to Model list] [Back to README]

user_current_put_subscription

WatchInfo user_current_put_subscription(owner, repo)

Watch a repo

Example

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

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json, text/html

[Back to top] [Back to API list] [Back to Model list] [Back to README]

user_tracked_times

list[TrackedTime] user_tracked_times(owner, repo, user)

List a user's tracked times in a repo

Example

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]**

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]