You've already forked gitea_python_api
Init
This commit is contained in:
15
swagger_client/api/__init__.py
Normal file
15
swagger_client/api/__init__.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
# flake8: noqa
|
||||
|
||||
# import apis into api package
|
||||
from swagger_client.api.activitypub_api import ActivitypubApi
|
||||
from swagger_client.api.admin_api import AdminApi
|
||||
from swagger_client.api.issue_api import IssueApi
|
||||
from swagger_client.api.miscellaneous_api import MiscellaneousApi
|
||||
from swagger_client.api.notification_api import NotificationApi
|
||||
from swagger_client.api.organization_api import OrganizationApi
|
||||
from swagger_client.api.package_api import PackageApi
|
||||
from swagger_client.api.repository_api import RepositoryApi
|
||||
from swagger_client.api.settings_api import SettingsApi
|
||||
from swagger_client.api.user_api import UserApi
|
||||
228
swagger_client/api/activitypub_api.py
Normal file
228
swagger_client/api/activitypub_api.py
Normal file
@@ -0,0 +1,228 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Gitea API
|
||||
|
||||
This documentation describes the Gitea API. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 1.25.2
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from swagger_client.api_client import ApiClient
|
||||
|
||||
|
||||
class ActivitypubApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def activitypub_person(self, user_id, **kwargs): # noqa: E501
|
||||
"""Returns the Person actor for a user # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.activitypub_person(user_id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int user_id: user ID of the user (required)
|
||||
:return: ActivityPub
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.activitypub_person_with_http_info(user_id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.activitypub_person_with_http_info(user_id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def activitypub_person_with_http_info(self, user_id, **kwargs): # noqa: E501
|
||||
"""Returns the Person actor for a user # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.activitypub_person_with_http_info(user_id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int user_id: user ID of the user (required)
|
||||
:return: ActivityPub
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['user_id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method activitypub_person" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'user_id' is set
|
||||
if self.api_client.client_side_validation and ('user_id' not in params or
|
||||
params['user_id'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `user_id` when calling `activitypub_person`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'user_id' in params:
|
||||
path_params['user-id'] = params['user_id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json', 'text/plain']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/activitypub/user-id/{user-id}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='ActivityPub', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def activitypub_person_inbox(self, user_id, **kwargs): # noqa: E501
|
||||
"""Send to the inbox # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.activitypub_person_inbox(user_id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int user_id: user ID of the user (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.activitypub_person_inbox_with_http_info(user_id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.activitypub_person_inbox_with_http_info(user_id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def activitypub_person_inbox_with_http_info(self, user_id, **kwargs): # noqa: E501
|
||||
"""Send to the inbox # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.activitypub_person_inbox_with_http_info(user_id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int user_id: user ID of the user (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['user_id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method activitypub_person_inbox" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'user_id' is set
|
||||
if self.api_client.client_side_validation and ('user_id' not in params or
|
||||
params['user_id'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `user_id` when calling `activitypub_person_inbox`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'user_id' in params:
|
||||
path_params['user-id'] = params['user_id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json', 'text/plain']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/activitypub/user-id/{user-id}/inbox', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
3226
swagger_client/api/admin_api.py
Normal file
3226
swagger_client/api/admin_api.py
Normal file
File diff suppressed because it is too large
Load Diff
8211
swagger_client/api/issue_api.py
Normal file
8211
swagger_client/api/issue_api.py
Normal file
File diff suppressed because it is too large
Load Diff
1231
swagger_client/api/miscellaneous_api.py
Normal file
1231
swagger_client/api/miscellaneous_api.py
Normal file
File diff suppressed because it is too large
Load Diff
803
swagger_client/api/notification_api.py
Normal file
803
swagger_client/api/notification_api.py
Normal file
@@ -0,0 +1,803 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Gitea API
|
||||
|
||||
This documentation describes the Gitea API. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 1.25.2
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from swagger_client.api_client import ApiClient
|
||||
|
||||
|
||||
class NotificationApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def notify_get_list(self, **kwargs): # noqa: E501
|
||||
"""List users's notification threads # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.notify_get_list(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param bool all: If true, show notifications marked as read. Default value is false
|
||||
:param list[str] status_types: Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned.
|
||||
:param list[str] subject_type: filter notifications by subject type
|
||||
:param datetime since: Only show notifications updated after the given time. This is a timestamp in RFC 3339 format
|
||||
:param datetime before: Only show notifications updated before the given time. This is a timestamp in RFC 3339 format
|
||||
:param int page: page number of results to return (1-based)
|
||||
:param int limit: page size of results
|
||||
:return: list[NotificationThread]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.notify_get_list_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.notify_get_list_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def notify_get_list_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""List users's notification threads # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.notify_get_list_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param bool all: If true, show notifications marked as read. Default value is false
|
||||
:param list[str] status_types: Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned.
|
||||
:param list[str] subject_type: filter notifications by subject type
|
||||
:param datetime since: Only show notifications updated after the given time. This is a timestamp in RFC 3339 format
|
||||
:param datetime before: Only show notifications updated before the given time. This is a timestamp in RFC 3339 format
|
||||
:param int page: page number of results to return (1-based)
|
||||
:param int limit: page size of results
|
||||
:return: list[NotificationThread]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['all', 'status_types', 'subject_type', 'since', 'before', 'page', 'limit'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method notify_get_list" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
if 'all' in params:
|
||||
query_params.append(('all', params['all'])) # noqa: E501
|
||||
if 'status_types' in params:
|
||||
query_params.append(('status-types', params['status_types'])) # noqa: E501
|
||||
collection_formats['status-types'] = 'multi' # noqa: E501
|
||||
if 'subject_type' in params:
|
||||
query_params.append(('subject-type', params['subject_type'])) # noqa: E501
|
||||
collection_formats['subject-type'] = 'multi' # noqa: E501
|
||||
if 'since' in params:
|
||||
query_params.append(('since', params['since'])) # noqa: E501
|
||||
if 'before' in params:
|
||||
query_params.append(('before', params['before'])) # noqa: E501
|
||||
if 'page' in params:
|
||||
query_params.append(('page', params['page'])) # noqa: E501
|
||||
if 'limit' in params:
|
||||
query_params.append(('limit', params['limit'])) # noqa: E501
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/notifications', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[NotificationThread]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def notify_get_repo_list(self, owner, repo, **kwargs): # noqa: E501
|
||||
"""List users's notification threads on a specific repo # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.notify_get_repo_list(owner, repo, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str owner: owner of the repo (required)
|
||||
:param str repo: name of the repo (required)
|
||||
:param bool all: If true, show notifications marked as read. Default value is false
|
||||
:param list[str] status_types: Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned
|
||||
:param list[str] subject_type: filter notifications by subject type
|
||||
:param datetime since: Only show notifications updated after the given time. This is a timestamp in RFC 3339 format
|
||||
:param datetime before: Only show notifications updated before the given time. This is a timestamp in RFC 3339 format
|
||||
:param int page: page number of results to return (1-based)
|
||||
:param int limit: page size of results
|
||||
:return: list[NotificationThread]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.notify_get_repo_list_with_http_info(owner, repo, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.notify_get_repo_list_with_http_info(owner, repo, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def notify_get_repo_list_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
||||
"""List users's notification threads on a specific repo # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.notify_get_repo_list_with_http_info(owner, repo, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str owner: owner of the repo (required)
|
||||
:param str repo: name of the repo (required)
|
||||
:param bool all: If true, show notifications marked as read. Default value is false
|
||||
:param list[str] status_types: Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned
|
||||
:param list[str] subject_type: filter notifications by subject type
|
||||
:param datetime since: Only show notifications updated after the given time. This is a timestamp in RFC 3339 format
|
||||
:param datetime before: Only show notifications updated before the given time. This is a timestamp in RFC 3339 format
|
||||
:param int page: page number of results to return (1-based)
|
||||
:param int limit: page size of results
|
||||
:return: list[NotificationThread]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['owner', 'repo', 'all', 'status_types', 'subject_type', 'since', 'before', 'page', 'limit'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method notify_get_repo_list" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'owner' is set
|
||||
if self.api_client.client_side_validation and ('owner' not in params or
|
||||
params['owner'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `owner` when calling `notify_get_repo_list`") # noqa: E501
|
||||
# verify the required parameter 'repo' is set
|
||||
if self.api_client.client_side_validation and ('repo' not in params or
|
||||
params['repo'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `repo` when calling `notify_get_repo_list`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'owner' in params:
|
||||
path_params['owner'] = params['owner'] # noqa: E501
|
||||
if 'repo' in params:
|
||||
path_params['repo'] = params['repo'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
if 'all' in params:
|
||||
query_params.append(('all', params['all'])) # noqa: E501
|
||||
if 'status_types' in params:
|
||||
query_params.append(('status-types', params['status_types'])) # noqa: E501
|
||||
collection_formats['status-types'] = 'multi' # noqa: E501
|
||||
if 'subject_type' in params:
|
||||
query_params.append(('subject-type', params['subject_type'])) # noqa: E501
|
||||
collection_formats['subject-type'] = 'multi' # noqa: E501
|
||||
if 'since' in params:
|
||||
query_params.append(('since', params['since'])) # noqa: E501
|
||||
if 'before' in params:
|
||||
query_params.append(('before', params['before'])) # noqa: E501
|
||||
if 'page' in params:
|
||||
query_params.append(('page', params['page'])) # noqa: E501
|
||||
if 'limit' in params:
|
||||
query_params.append(('limit', params['limit'])) # noqa: E501
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/repos/{owner}/{repo}/notifications', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[NotificationThread]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def notify_get_thread(self, id, **kwargs): # noqa: E501
|
||||
"""Get notification thread by ID # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.notify_get_thread(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str id: id of notification thread (required)
|
||||
:return: NotificationThread
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.notify_get_thread_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.notify_get_thread_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def notify_get_thread_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Get notification thread by ID # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.notify_get_thread_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str id: id of notification thread (required)
|
||||
:return: NotificationThread
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method notify_get_thread" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if self.api_client.client_side_validation and ('id' not in params or
|
||||
params['id'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `id` when calling `notify_get_thread`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/notifications/threads/{id}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='NotificationThread', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def notify_new_available(self, **kwargs): # noqa: E501
|
||||
"""Check if unread notifications exist # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.notify_new_available(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: NotificationCount
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.notify_new_available_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.notify_new_available_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def notify_new_available_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Check if unread notifications exist # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.notify_new_available_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: NotificationCount
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = [] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method notify_new_available" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json', 'text/html']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json', 'text/plain']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/notifications/new', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='NotificationCount', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def notify_read_list(self, **kwargs): # noqa: E501
|
||||
"""Mark notification threads as read, pinned or unread # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.notify_read_list(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param datetime last_read_at: Describes the last point that notifications were checked. Anything updated since this time will not be updated.
|
||||
:param str all: If true, mark all notifications on this repo. Default value is false
|
||||
:param list[str] status_types: Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.
|
||||
:param str to_status: Status to mark notifications as, Defaults to read.
|
||||
:return: list[NotificationThread]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.notify_read_list_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.notify_read_list_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def notify_read_list_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Mark notification threads as read, pinned or unread # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.notify_read_list_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param datetime last_read_at: Describes the last point that notifications were checked. Anything updated since this time will not be updated.
|
||||
:param str all: If true, mark all notifications on this repo. Default value is false
|
||||
:param list[str] status_types: Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.
|
||||
:param str to_status: Status to mark notifications as, Defaults to read.
|
||||
:return: list[NotificationThread]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['last_read_at', 'all', 'status_types', 'to_status'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method notify_read_list" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
if 'last_read_at' in params:
|
||||
query_params.append(('last_read_at', params['last_read_at'])) # noqa: E501
|
||||
if 'all' in params:
|
||||
query_params.append(('all', params['all'])) # noqa: E501
|
||||
if 'status_types' in params:
|
||||
query_params.append(('status-types', params['status_types'])) # noqa: E501
|
||||
collection_formats['status-types'] = 'multi' # noqa: E501
|
||||
if 'to_status' in params:
|
||||
query_params.append(('to-status', params['to_status'])) # noqa: E501
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/notifications', 'PUT',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[NotificationThread]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def notify_read_repo_list(self, owner, repo, **kwargs): # noqa: E501
|
||||
"""Mark notification threads as read, pinned or unread on a specific repo # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.notify_read_repo_list(owner, repo, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str owner: owner of the repo (required)
|
||||
:param str repo: name of the repo (required)
|
||||
:param str all: If true, mark all notifications on this repo. Default value is false
|
||||
:param list[str] status_types: Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.
|
||||
:param str to_status: Status to mark notifications as. Defaults to read.
|
||||
:param datetime last_read_at: Describes the last point that notifications were checked. Anything updated since this time will not be updated.
|
||||
:return: list[NotificationThread]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.notify_read_repo_list_with_http_info(owner, repo, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.notify_read_repo_list_with_http_info(owner, repo, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def notify_read_repo_list_with_http_info(self, owner, repo, **kwargs): # noqa: E501
|
||||
"""Mark notification threads as read, pinned or unread on a specific repo # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.notify_read_repo_list_with_http_info(owner, repo, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str owner: owner of the repo (required)
|
||||
:param str repo: name of the repo (required)
|
||||
:param str all: If true, mark all notifications on this repo. Default value is false
|
||||
:param list[str] status_types: Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.
|
||||
:param str to_status: Status to mark notifications as. Defaults to read.
|
||||
:param datetime last_read_at: Describes the last point that notifications were checked. Anything updated since this time will not be updated.
|
||||
:return: list[NotificationThread]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['owner', 'repo', 'all', 'status_types', 'to_status', 'last_read_at'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method notify_read_repo_list" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'owner' is set
|
||||
if self.api_client.client_side_validation and ('owner' not in params or
|
||||
params['owner'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `owner` when calling `notify_read_repo_list`") # noqa: E501
|
||||
# verify the required parameter 'repo' is set
|
||||
if self.api_client.client_side_validation and ('repo' not in params or
|
||||
params['repo'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `repo` when calling `notify_read_repo_list`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'owner' in params:
|
||||
path_params['owner'] = params['owner'] # noqa: E501
|
||||
if 'repo' in params:
|
||||
path_params['repo'] = params['repo'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
if 'all' in params:
|
||||
query_params.append(('all', params['all'])) # noqa: E501
|
||||
if 'status_types' in params:
|
||||
query_params.append(('status-types', params['status_types'])) # noqa: E501
|
||||
collection_formats['status-types'] = 'multi' # noqa: E501
|
||||
if 'to_status' in params:
|
||||
query_params.append(('to-status', params['to_status'])) # noqa: E501
|
||||
if 'last_read_at' in params:
|
||||
query_params.append(('last_read_at', params['last_read_at'])) # noqa: E501
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/repos/{owner}/{repo}/notifications', 'PUT',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[NotificationThread]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def notify_read_thread(self, id, **kwargs): # noqa: E501
|
||||
"""Mark notification thread as read by ID # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.notify_read_thread(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str id: id of notification thread (required)
|
||||
:param str to_status: Status to mark notifications as
|
||||
:return: NotificationThread
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.notify_read_thread_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.notify_read_thread_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def notify_read_thread_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Mark notification thread as read by ID # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.notify_read_thread_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str id: id of notification thread (required)
|
||||
:param str to_status: Status to mark notifications as
|
||||
:return: NotificationThread
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'to_status'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method notify_read_thread" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if self.api_client.client_side_validation and ('id' not in params or
|
||||
params['id'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `id` when calling `notify_read_thread`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
if 'to_status' in params:
|
||||
query_params.append(('to-status', params['to_status'])) # noqa: E501
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/notifications/threads/{id}', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='NotificationThread', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
6942
swagger_client/api/organization_api.py
Normal file
6942
swagger_client/api/organization_api.py
Normal file
File diff suppressed because it is too large
Load Diff
978
swagger_client/api/package_api.py
Normal file
978
swagger_client/api/package_api.py
Normal file
@@ -0,0 +1,978 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Gitea API
|
||||
|
||||
This documentation describes the Gitea API. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 1.25.2
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from swagger_client.api_client import ApiClient
|
||||
|
||||
|
||||
class PackageApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_package(self, owner, type, name, version, **kwargs): # noqa: E501
|
||||
"""Delete a package # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_package(owner, type, name, version, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str owner: owner of the package (required)
|
||||
:param str type: type of the package (required)
|
||||
:param str name: name of the package (required)
|
||||
:param str version: version of the package (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_package_with_http_info(owner, type, name, version, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_package_with_http_info(owner, type, name, version, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_package_with_http_info(self, owner, type, name, version, **kwargs): # noqa: E501
|
||||
"""Delete a package # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_package_with_http_info(owner, type, name, version, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str owner: owner of the package (required)
|
||||
:param str type: type of the package (required)
|
||||
:param str name: name of the package (required)
|
||||
:param str version: version of the package (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['owner', 'type', 'name', 'version'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_package" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'owner' is set
|
||||
if self.api_client.client_side_validation and ('owner' not in params or
|
||||
params['owner'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `owner` when calling `delete_package`") # noqa: E501
|
||||
# verify the required parameter 'type' is set
|
||||
if self.api_client.client_side_validation and ('type' not in params or
|
||||
params['type'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `type` when calling `delete_package`") # noqa: E501
|
||||
# verify the required parameter 'name' is set
|
||||
if self.api_client.client_side_validation and ('name' not in params or
|
||||
params['name'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `name` when calling `delete_package`") # noqa: E501
|
||||
# verify the required parameter 'version' is set
|
||||
if self.api_client.client_side_validation and ('version' not in params or
|
||||
params['version'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `version` when calling `delete_package`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'owner' in params:
|
||||
path_params['owner'] = params['owner'] # noqa: E501
|
||||
if 'type' in params:
|
||||
path_params['type'] = params['type'] # noqa: E501
|
||||
if 'name' in params:
|
||||
path_params['name'] = params['name'] # noqa: E501
|
||||
if 'version' in params:
|
||||
path_params['version'] = params['version'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json', 'text/html']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json', 'text/plain']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/packages/{owner}/{type}/{name}/{version}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def get_latest_package_version(self, owner, type, name, **kwargs): # noqa: E501
|
||||
"""Gets the latest version of a package # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.get_latest_package_version(owner, type, name, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str owner: owner of the package (required)
|
||||
:param str type: type of the package (required)
|
||||
:param str name: name of the package (required)
|
||||
:return: Package
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.get_latest_package_version_with_http_info(owner, type, name, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.get_latest_package_version_with_http_info(owner, type, name, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def get_latest_package_version_with_http_info(self, owner, type, name, **kwargs): # noqa: E501
|
||||
"""Gets the latest version of a package # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.get_latest_package_version_with_http_info(owner, type, name, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str owner: owner of the package (required)
|
||||
:param str type: type of the package (required)
|
||||
:param str name: name of the package (required)
|
||||
:return: Package
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['owner', 'type', 'name'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method get_latest_package_version" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'owner' is set
|
||||
if self.api_client.client_side_validation and ('owner' not in params or
|
||||
params['owner'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `owner` when calling `get_latest_package_version`") # noqa: E501
|
||||
# verify the required parameter 'type' is set
|
||||
if self.api_client.client_side_validation and ('type' not in params or
|
||||
params['type'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `type` when calling `get_latest_package_version`") # noqa: E501
|
||||
# verify the required parameter 'name' is set
|
||||
if self.api_client.client_side_validation and ('name' not in params or
|
||||
params['name'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `name` when calling `get_latest_package_version`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'owner' in params:
|
||||
path_params['owner'] = params['owner'] # noqa: E501
|
||||
if 'type' in params:
|
||||
path_params['type'] = params['type'] # noqa: E501
|
||||
if 'name' in params:
|
||||
path_params['name'] = params['name'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json', 'text/plain']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/packages/{owner}/{type}/{name}/-/latest', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Package', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def get_package(self, owner, type, name, version, **kwargs): # noqa: E501
|
||||
"""Gets a package # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.get_package(owner, type, name, version, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str owner: owner of the package (required)
|
||||
:param str type: type of the package (required)
|
||||
:param str name: name of the package (required)
|
||||
:param str version: version of the package (required)
|
||||
:return: Package
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.get_package_with_http_info(owner, type, name, version, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.get_package_with_http_info(owner, type, name, version, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def get_package_with_http_info(self, owner, type, name, version, **kwargs): # noqa: E501
|
||||
"""Gets a package # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.get_package_with_http_info(owner, type, name, version, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str owner: owner of the package (required)
|
||||
:param str type: type of the package (required)
|
||||
:param str name: name of the package (required)
|
||||
:param str version: version of the package (required)
|
||||
:return: Package
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['owner', 'type', 'name', 'version'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method get_package" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'owner' is set
|
||||
if self.api_client.client_side_validation and ('owner' not in params or
|
||||
params['owner'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `owner` when calling `get_package`") # noqa: E501
|
||||
# verify the required parameter 'type' is set
|
||||
if self.api_client.client_side_validation and ('type' not in params or
|
||||
params['type'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `type` when calling `get_package`") # noqa: E501
|
||||
# verify the required parameter 'name' is set
|
||||
if self.api_client.client_side_validation and ('name' not in params or
|
||||
params['name'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `name` when calling `get_package`") # noqa: E501
|
||||
# verify the required parameter 'version' is set
|
||||
if self.api_client.client_side_validation and ('version' not in params or
|
||||
params['version'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `version` when calling `get_package`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'owner' in params:
|
||||
path_params['owner'] = params['owner'] # noqa: E501
|
||||
if 'type' in params:
|
||||
path_params['type'] = params['type'] # noqa: E501
|
||||
if 'name' in params:
|
||||
path_params['name'] = params['name'] # noqa: E501
|
||||
if 'version' in params:
|
||||
path_params['version'] = params['version'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json', 'text/plain']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/packages/{owner}/{type}/{name}/{version}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Package', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def link_package(self, owner, type, name, repo_name, **kwargs): # noqa: E501
|
||||
"""Link a package to a repository # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.link_package(owner, type, name, repo_name, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str owner: owner of the package (required)
|
||||
:param str type: type of the package (required)
|
||||
:param str name: name of the package (required)
|
||||
:param str repo_name: name of the repository to link. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.link_package_with_http_info(owner, type, name, repo_name, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.link_package_with_http_info(owner, type, name, repo_name, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def link_package_with_http_info(self, owner, type, name, repo_name, **kwargs): # noqa: E501
|
||||
"""Link a package to a repository # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.link_package_with_http_info(owner, type, name, repo_name, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str owner: owner of the package (required)
|
||||
:param str type: type of the package (required)
|
||||
:param str name: name of the package (required)
|
||||
:param str repo_name: name of the repository to link. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['owner', 'type', 'name', 'repo_name'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method link_package" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'owner' is set
|
||||
if self.api_client.client_side_validation and ('owner' not in params or
|
||||
params['owner'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `owner` when calling `link_package`") # noqa: E501
|
||||
# verify the required parameter 'type' is set
|
||||
if self.api_client.client_side_validation and ('type' not in params or
|
||||
params['type'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `type` when calling `link_package`") # noqa: E501
|
||||
# verify the required parameter 'name' is set
|
||||
if self.api_client.client_side_validation and ('name' not in params or
|
||||
params['name'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `name` when calling `link_package`") # noqa: E501
|
||||
# verify the required parameter 'repo_name' is set
|
||||
if self.api_client.client_side_validation and ('repo_name' not in params or
|
||||
params['repo_name'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `repo_name` when calling `link_package`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'owner' in params:
|
||||
path_params['owner'] = params['owner'] # noqa: E501
|
||||
if 'type' in params:
|
||||
path_params['type'] = params['type'] # noqa: E501
|
||||
if 'name' in params:
|
||||
path_params['name'] = params['name'] # noqa: E501
|
||||
if 'repo_name' in params:
|
||||
path_params['repo_name'] = params['repo_name'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json', 'text/html']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json', 'text/plain']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/packages/{owner}/{type}/{name}/-/link/{repo_name}', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def list_package_files(self, owner, type, name, version, **kwargs): # noqa: E501
|
||||
"""Gets all files of a package # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.list_package_files(owner, type, name, version, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str owner: owner of the package (required)
|
||||
:param str type: type of the package (required)
|
||||
:param str name: name of the package (required)
|
||||
:param str version: version of the package (required)
|
||||
:return: list[PackageFile]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.list_package_files_with_http_info(owner, type, name, version, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.list_package_files_with_http_info(owner, type, name, version, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def list_package_files_with_http_info(self, owner, type, name, version, **kwargs): # noqa: E501
|
||||
"""Gets all files of a package # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.list_package_files_with_http_info(owner, type, name, version, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str owner: owner of the package (required)
|
||||
:param str type: type of the package (required)
|
||||
:param str name: name of the package (required)
|
||||
:param str version: version of the package (required)
|
||||
:return: list[PackageFile]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['owner', 'type', 'name', 'version'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method list_package_files" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'owner' is set
|
||||
if self.api_client.client_side_validation and ('owner' not in params or
|
||||
params['owner'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `owner` when calling `list_package_files`") # noqa: E501
|
||||
# verify the required parameter 'type' is set
|
||||
if self.api_client.client_side_validation and ('type' not in params or
|
||||
params['type'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `type` when calling `list_package_files`") # noqa: E501
|
||||
# verify the required parameter 'name' is set
|
||||
if self.api_client.client_side_validation and ('name' not in params or
|
||||
params['name'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `name` when calling `list_package_files`") # noqa: E501
|
||||
# verify the required parameter 'version' is set
|
||||
if self.api_client.client_side_validation and ('version' not in params or
|
||||
params['version'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `version` when calling `list_package_files`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'owner' in params:
|
||||
path_params['owner'] = params['owner'] # noqa: E501
|
||||
if 'type' in params:
|
||||
path_params['type'] = params['type'] # noqa: E501
|
||||
if 'name' in params:
|
||||
path_params['name'] = params['name'] # noqa: E501
|
||||
if 'version' in params:
|
||||
path_params['version'] = params['version'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json', 'text/plain']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/packages/{owner}/{type}/{name}/{version}/files', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[PackageFile]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def list_package_versions(self, owner, type, name, **kwargs): # noqa: E501
|
||||
"""Gets all versions of a package # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.list_package_versions(owner, type, name, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str owner: owner of the package (required)
|
||||
:param str type: type of the package (required)
|
||||
:param str name: name of the package (required)
|
||||
:param int page: page number of results to return (1-based)
|
||||
:param int limit: page size of results
|
||||
:return: list[Package]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.list_package_versions_with_http_info(owner, type, name, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.list_package_versions_with_http_info(owner, type, name, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def list_package_versions_with_http_info(self, owner, type, name, **kwargs): # noqa: E501
|
||||
"""Gets all versions of a package # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.list_package_versions_with_http_info(owner, type, name, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str owner: owner of the package (required)
|
||||
:param str type: type of the package (required)
|
||||
:param str name: name of the package (required)
|
||||
:param int page: page number of results to return (1-based)
|
||||
:param int limit: page size of results
|
||||
:return: list[Package]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['owner', 'type', 'name', 'page', 'limit'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method list_package_versions" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'owner' is set
|
||||
if self.api_client.client_side_validation and ('owner' not in params or
|
||||
params['owner'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `owner` when calling `list_package_versions`") # noqa: E501
|
||||
# verify the required parameter 'type' is set
|
||||
if self.api_client.client_side_validation and ('type' not in params or
|
||||
params['type'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `type` when calling `list_package_versions`") # noqa: E501
|
||||
# verify the required parameter 'name' is set
|
||||
if self.api_client.client_side_validation and ('name' not in params or
|
||||
params['name'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `name` when calling `list_package_versions`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'owner' in params:
|
||||
path_params['owner'] = params['owner'] # noqa: E501
|
||||
if 'type' in params:
|
||||
path_params['type'] = params['type'] # noqa: E501
|
||||
if 'name' in params:
|
||||
path_params['name'] = params['name'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
if 'page' in params:
|
||||
query_params.append(('page', params['page'])) # noqa: E501
|
||||
if 'limit' in params:
|
||||
query_params.append(('limit', params['limit'])) # noqa: E501
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json', 'text/plain']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/packages/{owner}/{type}/{name}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Package]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def list_packages(self, owner, **kwargs): # noqa: E501
|
||||
"""Gets all packages of an owner # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.list_packages(owner, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str owner: owner of the packages (required)
|
||||
:param int page: page number of results to return (1-based)
|
||||
:param int limit: page size of results
|
||||
:param str type: package type filter
|
||||
:param str q: name filter
|
||||
:return: list[Package]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.list_packages_with_http_info(owner, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.list_packages_with_http_info(owner, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def list_packages_with_http_info(self, owner, **kwargs): # noqa: E501
|
||||
"""Gets all packages of an owner # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.list_packages_with_http_info(owner, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str owner: owner of the packages (required)
|
||||
:param int page: page number of results to return (1-based)
|
||||
:param int limit: page size of results
|
||||
:param str type: package type filter
|
||||
:param str q: name filter
|
||||
:return: list[Package]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['owner', 'page', 'limit', 'type', 'q'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method list_packages" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'owner' is set
|
||||
if self.api_client.client_side_validation and ('owner' not in params or
|
||||
params['owner'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `owner` when calling `list_packages`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'owner' in params:
|
||||
path_params['owner'] = params['owner'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
if 'page' in params:
|
||||
query_params.append(('page', params['page'])) # noqa: E501
|
||||
if 'limit' in params:
|
||||
query_params.append(('limit', params['limit'])) # noqa: E501
|
||||
if 'type' in params:
|
||||
query_params.append(('type', params['type'])) # noqa: E501
|
||||
if 'q' in params:
|
||||
query_params.append(('q', params['q'])) # noqa: E501
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json', 'text/plain']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/packages/{owner}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Package]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def unlink_package(self, owner, type, name, **kwargs): # noqa: E501
|
||||
"""Unlink a package from a repository # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.unlink_package(owner, type, name, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str owner: owner of the package (required)
|
||||
:param str type: type of the package (required)
|
||||
:param str name: name of the package (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.unlink_package_with_http_info(owner, type, name, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.unlink_package_with_http_info(owner, type, name, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def unlink_package_with_http_info(self, owner, type, name, **kwargs): # noqa: E501
|
||||
"""Unlink a package from a repository # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.unlink_package_with_http_info(owner, type, name, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str owner: owner of the package (required)
|
||||
:param str type: type of the package (required)
|
||||
:param str name: name of the package (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['owner', 'type', 'name'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method unlink_package" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'owner' is set
|
||||
if self.api_client.client_side_validation and ('owner' not in params or
|
||||
params['owner'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `owner` when calling `unlink_package`") # noqa: E501
|
||||
# verify the required parameter 'type' is set
|
||||
if self.api_client.client_side_validation and ('type' not in params or
|
||||
params['type'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `type` when calling `unlink_package`") # noqa: E501
|
||||
# verify the required parameter 'name' is set
|
||||
if self.api_client.client_side_validation and ('name' not in params or
|
||||
params['name'] is None): # noqa: E501
|
||||
raise ValueError("Missing the required parameter `name` when calling `unlink_package`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'owner' in params:
|
||||
path_params['owner'] = params['owner'] # noqa: E501
|
||||
if 'type' in params:
|
||||
path_params['type'] = params['type'] # noqa: E501
|
||||
if 'name' in params:
|
||||
path_params['name'] = params['name'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json', 'text/html']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json', 'text/plain']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/packages/{owner}/{type}/{name}/-/unlink', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
21800
swagger_client/api/repository_api.py
Normal file
21800
swagger_client/api/repository_api.py
Normal file
File diff suppressed because it is too large
Load Diff
390
swagger_client/api/settings_api.py
Normal file
390
swagger_client/api/settings_api.py
Normal file
@@ -0,0 +1,390 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Gitea API
|
||||
|
||||
This documentation describes the Gitea API. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 1.25.2
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from swagger_client.api_client import ApiClient
|
||||
|
||||
|
||||
class SettingsApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def get_general_api_settings(self, **kwargs): # noqa: E501
|
||||
"""Get instance's global settings for api # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.get_general_api_settings(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: GeneralAPISettings
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.get_general_api_settings_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.get_general_api_settings_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def get_general_api_settings_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Get instance's global settings for api # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.get_general_api_settings_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: GeneralAPISettings
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = [] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method get_general_api_settings" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json', 'text/plain']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/settings/api', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='GeneralAPISettings', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def get_general_attachment_settings(self, **kwargs): # noqa: E501
|
||||
"""Get instance's global settings for Attachment # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.get_general_attachment_settings(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: GeneralAttachmentSettings
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.get_general_attachment_settings_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.get_general_attachment_settings_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def get_general_attachment_settings_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Get instance's global settings for Attachment # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.get_general_attachment_settings_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: GeneralAttachmentSettings
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = [] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method get_general_attachment_settings" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json', 'text/plain']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/settings/attachment', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='GeneralAttachmentSettings', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def get_general_repository_settings(self, **kwargs): # noqa: E501
|
||||
"""Get instance's global settings for repositories # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.get_general_repository_settings(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: GeneralRepoSettings
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.get_general_repository_settings_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.get_general_repository_settings_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def get_general_repository_settings_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Get instance's global settings for repositories # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.get_general_repository_settings_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: GeneralRepoSettings
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = [] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method get_general_repository_settings" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json', 'text/plain']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/settings/repository', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='GeneralRepoSettings', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def get_general_ui_settings(self, **kwargs): # noqa: E501
|
||||
"""Get instance's global settings for ui # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.get_general_ui_settings(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: GeneralUISettings
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.get_general_ui_settings_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.get_general_ui_settings_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def get_general_ui_settings_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Get instance's global settings for ui # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.get_general_ui_settings_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: GeneralUISettings
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = [] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method get_general_ui_settings" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json', 'text/plain']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/settings/ui', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='GeneralUISettings', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
7506
swagger_client/api/user_api.py
Normal file
7506
swagger_client/api/user_api.py
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user