All URIs are relative to http://localhost:34913/api/v1
Method | HTTP request | Description |
---|---|---|
create_branch | POST /repos/{owner}/{repository}/branch | create branch |
delete_branch | DELETE /repos/{owner}/{repository}/branch | delete branch |
get_branch | GET /repos/{owner}/{repository}/branch | get branch |
list_branches | GET /repos/{owner}/{repository}/branches | list branches |
Branch create_branch(body, owner, repository)
create branch
from __future__ import print_function
import time
import jiaozifs_client
from jiaozifs_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = jiaozifs_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure API key authorization: cookie_auth
configuration = jiaozifs_client.Configuration()
configuration.api_key['internal_auth_session'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['internal_auth_session'] = 'Bearer'
# create an instance of the API class
api_instance = jiaozifs_client.BranchesApi(jiaozifs_client.ApiClient(configuration))
body = jiaozifs_client.BranchCreation() # BranchCreation |
owner = 'owner_example' # str |
repository = 'repository_example' # str |
try:
# create branch
api_response = api_instance.create_branch(body, owner, repository)
pprint(api_response)
except ApiException as e:
print("Exception when calling BranchesApi->create_branch: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | BranchCreation | ||
owner | str | ||
repository | str |
basic_auth, cookie_auth, jwt_token
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_branch(owner, repository, ref_name)
delete branch
from __future__ import print_function
import time
import jiaozifs_client
from jiaozifs_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = jiaozifs_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure API key authorization: cookie_auth
configuration = jiaozifs_client.Configuration()
configuration.api_key['internal_auth_session'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['internal_auth_session'] = 'Bearer'
# create an instance of the API class
api_instance = jiaozifs_client.BranchesApi(jiaozifs_client.ApiClient(configuration))
owner = 'owner_example' # str |
repository = 'repository_example' # str |
ref_name = 'ref_name_example' # str |
try:
# delete branch
api_instance.delete_branch(owner, repository, ref_name)
except ApiException as e:
print("Exception when calling BranchesApi->delete_branch: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
owner | str | ||
repository | str | ||
ref_name | str |
void (empty response body)
basic_auth, cookie_auth, jwt_token
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Branch get_branch(owner, repository, ref_name)
get branch
from __future__ import print_function
import time
import jiaozifs_client
from jiaozifs_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = jiaozifs_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure API key authorization: cookie_auth
configuration = jiaozifs_client.Configuration()
configuration.api_key['internal_auth_session'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['internal_auth_session'] = 'Bearer'
# create an instance of the API class
api_instance = jiaozifs_client.BranchesApi(jiaozifs_client.ApiClient(configuration))
owner = 'owner_example' # str |
repository = 'repository_example' # str |
ref_name = 'ref_name_example' # str |
try:
# get branch
api_response = api_instance.get_branch(owner, repository, ref_name)
pprint(api_response)
except ApiException as e:
print("Exception when calling BranchesApi->get_branch: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
owner | str | ||
repository | str | ||
ref_name | str |
basic_auth, cookie_auth, jwt_token
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BranchList list_branches(owner, repository, prefix=prefix, after=after, amount=amount)
list branches
from __future__ import print_function
import time
import jiaozifs_client
from jiaozifs_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = jiaozifs_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure API key authorization: cookie_auth
configuration = jiaozifs_client.Configuration()
configuration.api_key['internal_auth_session'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['internal_auth_session'] = 'Bearer'
# create an instance of the API class
api_instance = jiaozifs_client.BranchesApi(jiaozifs_client.ApiClient(configuration))
owner = 'owner_example' # str |
repository = 'repository_example' # str |
prefix = 'prefix_example' # str | return items prefixed with this value (optional)
after = 'after_example' # str | return items after this value (optional)
amount = 100 # int | how many items to return (optional) (default to 100)
try:
# list branches
api_response = api_instance.list_branches(owner, repository, prefix=prefix, after=after, amount=amount)
pprint(api_response)
except ApiException as e:
print("Exception when calling BranchesApi->list_branches: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
owner | str | ||
repository | str | ||
prefix | str | return items prefixed with this value | [optional] |
after | str | return items after this value | [optional] |
amount | int | how many items to return | [optional] [default to 100] |
basic_auth, cookie_auth, jwt_token
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]