All URIs are relative to https://localhost/git/api/v1
Method | HTTP request | Description |
---|---|---|
delete_package | DELETE /packages/{owner}/{type}/{name}/{version} | Delete a package |
get_package | GET /packages/{owner}/{type}/{name}/{version} | Gets a package |
list_package_files | GET /packages/{owner}/{type}/{name}/{version}/files | Gets all files of a package |
list_packages | GET /packages/{owner} | Gets all packages of an owner |
delete_package(owner, type, name, version)
Delete a package
from __future__ import print_function
import time
import focs_gitea
from focs_gitea.rest import ApiException
from pprint import pprint
# Configure API key authorization: AccessToken
configuration = focs_gitea.Configuration()
configuration.api_key['access_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['access_token'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration = focs_gitea.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = focs_gitea.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure API key authorization: SudoHeader
configuration = focs_gitea.Configuration()
configuration.api_key['Sudo'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Sudo'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration = focs_gitea.Configuration()
configuration.api_key['sudo'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sudo'] = 'Bearer'
# Configure API key authorization: TOTPHeader
configuration = focs_gitea.Configuration()
configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer'
# Configure API key authorization: Token
configuration = focs_gitea.Configuration()
configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['token'] = 'Bearer'
# create an instance of the API class
api_instance = focs_gitea.PackageApi(focs_gitea.ApiClient(configuration))
owner = 'owner_example' # str | owner of the package
type = 'type_example' # str | type of the package
name = 'name_example' # str | name of the package
version = 'version_example' # str | version of the package
try:
# Delete a package
api_instance.delete_package(owner, type, name, version)
except ApiException as e:
print("Exception when calling PackageApi->delete_package: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
owner | str | owner of the package | |
type | str | type of the package | |
name | str | name of the package | |
version | str | version of the package |
void (empty response body)
AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, TOTPHeader, Token
- 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]
Package get_package(owner, type, name, version)
Gets a package
from __future__ import print_function
import time
import focs_gitea
from focs_gitea.rest import ApiException
from pprint import pprint
# Configure API key authorization: AccessToken
configuration = focs_gitea.Configuration()
configuration.api_key['access_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['access_token'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration = focs_gitea.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = focs_gitea.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure API key authorization: SudoHeader
configuration = focs_gitea.Configuration()
configuration.api_key['Sudo'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Sudo'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration = focs_gitea.Configuration()
configuration.api_key['sudo'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sudo'] = 'Bearer'
# Configure API key authorization: TOTPHeader
configuration = focs_gitea.Configuration()
configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer'
# Configure API key authorization: Token
configuration = focs_gitea.Configuration()
configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['token'] = 'Bearer'
# create an instance of the API class
api_instance = focs_gitea.PackageApi(focs_gitea.ApiClient(configuration))
owner = 'owner_example' # str | owner of the package
type = 'type_example' # str | type of the package
name = 'name_example' # str | name of the package
version = 'version_example' # str | version of the package
try:
# Gets a package
api_response = api_instance.get_package(owner, type, name, version)
pprint(api_response)
except ApiException as e:
print("Exception when calling PackageApi->get_package: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
owner | str | owner of the package | |
type | str | type of the package | |
name | str | name of the package | |
version | str | version of the package |
AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, TOTPHeader, Token
- Content-Type: application/json, text/plain
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[PackageFile] list_package_files(owner, type, name, version)
Gets all files of a package
from __future__ import print_function
import time
import focs_gitea
from focs_gitea.rest import ApiException
from pprint import pprint
# Configure API key authorization: AccessToken
configuration = focs_gitea.Configuration()
configuration.api_key['access_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['access_token'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration = focs_gitea.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = focs_gitea.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure API key authorization: SudoHeader
configuration = focs_gitea.Configuration()
configuration.api_key['Sudo'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Sudo'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration = focs_gitea.Configuration()
configuration.api_key['sudo'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sudo'] = 'Bearer'
# Configure API key authorization: TOTPHeader
configuration = focs_gitea.Configuration()
configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer'
# Configure API key authorization: Token
configuration = focs_gitea.Configuration()
configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['token'] = 'Bearer'
# create an instance of the API class
api_instance = focs_gitea.PackageApi(focs_gitea.ApiClient(configuration))
owner = 'owner_example' # str | owner of the package
type = 'type_example' # str | type of the package
name = 'name_example' # str | name of the package
version = 'version_example' # str | version of the package
try:
# Gets all files of a package
api_response = api_instance.list_package_files(owner, type, name, version)
pprint(api_response)
except ApiException as e:
print("Exception when calling PackageApi->list_package_files: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
owner | str | owner of the package | |
type | str | type of the package | |
name | str | name of the package | |
version | str | version of the package |
AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, TOTPHeader, Token
- Content-Type: application/json, text/plain
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[Package] list_packages(owner, page=page, limit=limit, type=type, q=q)
Gets all packages of an owner
from __future__ import print_function
import time
import focs_gitea
from focs_gitea.rest import ApiException
from pprint import pprint
# Configure API key authorization: AccessToken
configuration = focs_gitea.Configuration()
configuration.api_key['access_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['access_token'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration = focs_gitea.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = focs_gitea.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure API key authorization: SudoHeader
configuration = focs_gitea.Configuration()
configuration.api_key['Sudo'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Sudo'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration = focs_gitea.Configuration()
configuration.api_key['sudo'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sudo'] = 'Bearer'
# Configure API key authorization: TOTPHeader
configuration = focs_gitea.Configuration()
configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer'
# Configure API key authorization: Token
configuration = focs_gitea.Configuration()
configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['token'] = 'Bearer'
# create an instance of the API class
api_instance = focs_gitea.PackageApi(focs_gitea.ApiClient(configuration))
owner = 'owner_example' # str | owner of the packages
page = 56 # int | page number of results to return (1-based) (optional)
limit = 56 # int | page size of results (optional)
type = 'type_example' # str | package type filter (optional)
q = 'q_example' # str | name filter (optional)
try:
# Gets all packages of an owner
api_response = api_instance.list_packages(owner, page=page, limit=limit, type=type, q=q)
pprint(api_response)
except ApiException as e:
print("Exception when calling PackageApi->list_packages: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
owner | str | owner of the packages | |
page | int | page number of results to return (1-based) | [optional] |
limit | int | page size of results | [optional] |
type | str | package type filter | [optional] |
q | str | name filter | [optional] |
AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, TOTPHeader, Token
- Content-Type: application/json, text/plain
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]