1691 lines
66 KiB
Python
1691 lines
66 KiB
Python
# coding: utf-8
|
|
|
|
"""
|
|
api/v2/activity_service.proto
|
|
|
|
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
|
|
|
|
OpenAPI spec version: version not set
|
|
|
|
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 memos.api_client import ApiClient
|
|
|
|
|
|
class MemoServiceApi(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 memo_service_create_memo(self, body, **kwargs): # noqa: E501
|
|
"""CreateMemo creates a memo. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_create_memo(body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param V2CreateMemoRequest body: (required)
|
|
:return: V2CreateMemoResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('async_req'):
|
|
return self.memo_service_create_memo_with_http_info(body, **kwargs) # noqa: E501
|
|
else:
|
|
(data) = self.memo_service_create_memo_with_http_info(body, **kwargs) # noqa: E501
|
|
return data
|
|
|
|
def memo_service_create_memo_with_http_info(self, body, **kwargs): # noqa: E501
|
|
"""CreateMemo creates a memo. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_create_memo_with_http_info(body, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param V2CreateMemoRequest body: (required)
|
|
:return: V2CreateMemoResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['body'] # noqa: E501
|
|
all_params.append('async_req')
|
|
all_params.append('_return_http_data_only')
|
|
all_params.append('_preload_content')
|
|
all_params.append('_request_timeout')
|
|
|
|
params = locals()
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
if key not in all_params:
|
|
raise TypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method memo_service_create_memo" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params or
|
|
params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `memo_service_create_memo`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = [] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v2/memos', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V2CreateMemoResponse', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=params.get('async_req'),
|
|
_return_http_data_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 memo_service_create_memo_comment(self, id, **kwargs): # noqa: E501
|
|
"""CreateMemoComment creates a comment for a memo. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_create_memo_comment(id, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param int id: id is the memo id to create comment for. (required)
|
|
:param str create_content:
|
|
:param str create_visibility:
|
|
:return: V2CreateMemoCommentResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('async_req'):
|
|
return self.memo_service_create_memo_comment_with_http_info(id, **kwargs) # noqa: E501
|
|
else:
|
|
(data) = self.memo_service_create_memo_comment_with_http_info(id, **kwargs) # noqa: E501
|
|
return data
|
|
|
|
def memo_service_create_memo_comment_with_http_info(self, id, **kwargs): # noqa: E501
|
|
"""CreateMemoComment creates a comment for a memo. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_create_memo_comment_with_http_info(id, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param int id: id is the memo id to create comment for. (required)
|
|
:param str create_content:
|
|
:param str create_visibility:
|
|
:return: V2CreateMemoCommentResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['id', 'create_content', 'create_visibility'] # noqa: E501
|
|
all_params.append('async_req')
|
|
all_params.append('_return_http_data_only')
|
|
all_params.append('_preload_content')
|
|
all_params.append('_request_timeout')
|
|
|
|
params = locals()
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
if key not in all_params:
|
|
raise TypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method memo_service_create_memo_comment" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# verify the required parameter 'id' is set
|
|
if ('id' not in params or
|
|
params['id'] is None):
|
|
raise ValueError("Missing the required parameter `id` when calling `memo_service_create_memo_comment`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'id' in params:
|
|
path_params['id'] = params['id'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'create_content' in params:
|
|
query_params.append(('create.content', params['create_content'])) # noqa: E501
|
|
if 'create_visibility' in params:
|
|
query_params.append(('create.visibility', params['create_visibility'])) # 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
|
|
|
|
# Authentication setting
|
|
auth_settings = [] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v2/memos/{id}/comments', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V2CreateMemoCommentResponse', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=params.get('async_req'),
|
|
_return_http_data_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 memo_service_delete_memo(self, id, **kwargs): # noqa: E501
|
|
"""DeleteMemo deletes a memo 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.memo_service_delete_memo(id, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param int id: (required)
|
|
:return: V2DeleteMemoResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('async_req'):
|
|
return self.memo_service_delete_memo_with_http_info(id, **kwargs) # noqa: E501
|
|
else:
|
|
(data) = self.memo_service_delete_memo_with_http_info(id, **kwargs) # noqa: E501
|
|
return data
|
|
|
|
def memo_service_delete_memo_with_http_info(self, id, **kwargs): # noqa: E501
|
|
"""DeleteMemo deletes a memo 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.memo_service_delete_memo_with_http_info(id, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param int id: (required)
|
|
:return: V2DeleteMemoResponse
|
|
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 memo_service_delete_memo" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# verify the required parameter 'id' is set
|
|
if ('id' not in params or
|
|
params['id'] is None):
|
|
raise ValueError("Missing the required parameter `id` when calling `memo_service_delete_memo`") # 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
|
|
|
|
# Authentication setting
|
|
auth_settings = [] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v2/memos/{id}', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V2DeleteMemoResponse', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=params.get('async_req'),
|
|
_return_http_data_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 memo_service_delete_memo_reaction(self, id, reaction_id, **kwargs): # noqa: E501
|
|
"""DeleteMemoReaction deletes a reaction for a memo. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_delete_memo_reaction(id, reaction_id, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param int id: (required)
|
|
:param int reaction_id: (required)
|
|
:return: V2DeleteMemoReactionResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('async_req'):
|
|
return self.memo_service_delete_memo_reaction_with_http_info(id, reaction_id, **kwargs) # noqa: E501
|
|
else:
|
|
(data) = self.memo_service_delete_memo_reaction_with_http_info(id, reaction_id, **kwargs) # noqa: E501
|
|
return data
|
|
|
|
def memo_service_delete_memo_reaction_with_http_info(self, id, reaction_id, **kwargs): # noqa: E501
|
|
"""DeleteMemoReaction deletes a reaction for a memo. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_delete_memo_reaction_with_http_info(id, reaction_id, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param int id: (required)
|
|
:param int reaction_id: (required)
|
|
:return: V2DeleteMemoReactionResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['id', 'reaction_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 memo_service_delete_memo_reaction" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# verify the required parameter 'id' is set
|
|
if ('id' not in params or
|
|
params['id'] is None):
|
|
raise ValueError("Missing the required parameter `id` when calling `memo_service_delete_memo_reaction`") # noqa: E501
|
|
# verify the required parameter 'reaction_id' is set
|
|
if ('reaction_id' not in params or
|
|
params['reaction_id'] is None):
|
|
raise ValueError("Missing the required parameter `reaction_id` when calling `memo_service_delete_memo_reaction`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'id' in params:
|
|
path_params['id'] = params['id'] # noqa: E501
|
|
if 'reaction_id' in params:
|
|
path_params['reactionId'] = params['reaction_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
|
|
|
|
# Authentication setting
|
|
auth_settings = [] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v2/memos/{id}/reactions/{reactionId}', 'DELETE',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V2DeleteMemoReactionResponse', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=params.get('async_req'),
|
|
_return_http_data_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 memo_service_export_memos(self, **kwargs): # noqa: E501
|
|
"""ExportMemos exports memos. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_export_memos(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param str filter: Same as ListMemosRequest.filter
|
|
:return: V2ExportMemosResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('async_req'):
|
|
return self.memo_service_export_memos_with_http_info(**kwargs) # noqa: E501
|
|
else:
|
|
(data) = self.memo_service_export_memos_with_http_info(**kwargs) # noqa: E501
|
|
return data
|
|
|
|
def memo_service_export_memos_with_http_info(self, **kwargs): # noqa: E501
|
|
"""ExportMemos exports memos. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_export_memos_with_http_info(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param str filter: Same as ListMemosRequest.filter
|
|
:return: V2ExportMemosResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['filter'] # noqa: E501
|
|
all_params.append('async_req')
|
|
all_params.append('_return_http_data_only')
|
|
all_params.append('_preload_content')
|
|
all_params.append('_request_timeout')
|
|
|
|
params = locals()
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
if key not in all_params:
|
|
raise TypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method memo_service_export_memos" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
if 'filter' in params:
|
|
query_params.append(('filter', params['filter'])) # 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
|
|
|
|
# Authentication setting
|
|
auth_settings = [] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v2/memos:export', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V2ExportMemosResponse', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=params.get('async_req'),
|
|
_return_http_data_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 memo_service_get_memo(self, id, **kwargs): # noqa: E501
|
|
"""GetMemo gets a memo 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.memo_service_get_memo(id, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param int id: (required)
|
|
:return: V2GetMemoResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('async_req'):
|
|
return self.memo_service_get_memo_with_http_info(id, **kwargs) # noqa: E501
|
|
else:
|
|
(data) = self.memo_service_get_memo_with_http_info(id, **kwargs) # noqa: E501
|
|
return data
|
|
|
|
def memo_service_get_memo_with_http_info(self, id, **kwargs): # noqa: E501
|
|
"""GetMemo gets a memo 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.memo_service_get_memo_with_http_info(id, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param int id: (required)
|
|
:return: V2GetMemoResponse
|
|
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 memo_service_get_memo" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# verify the required parameter 'id' is set
|
|
if ('id' not in params or
|
|
params['id'] is None):
|
|
raise ValueError("Missing the required parameter `id` when calling `memo_service_get_memo`") # 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
|
|
|
|
# Authentication setting
|
|
auth_settings = [] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v2/memos/{id}', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V2GetMemoResponse', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=params.get('async_req'),
|
|
_return_http_data_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 memo_service_get_memo_by_name(self, name, **kwargs): # noqa: E501
|
|
"""GetMemoByName gets a memo by name. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_get_memo_by_name(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param str name: (required)
|
|
:return: V2GetMemoByNameResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('async_req'):
|
|
return self.memo_service_get_memo_by_name_with_http_info(name, **kwargs) # noqa: E501
|
|
else:
|
|
(data) = self.memo_service_get_memo_by_name_with_http_info(name, **kwargs) # noqa: E501
|
|
return data
|
|
|
|
def memo_service_get_memo_by_name_with_http_info(self, name, **kwargs): # noqa: E501
|
|
"""GetMemoByName gets a memo by name. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_get_memo_by_name_with_http_info(name, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param str name: (required)
|
|
:return: V2GetMemoByNameResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['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 memo_service_get_memo_by_name" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# verify the required parameter 'name' is set
|
|
if ('name' not in params or
|
|
params['name'] is None):
|
|
raise ValueError("Missing the required parameter `name` when calling `memo_service_get_memo_by_name`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
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
|
|
|
|
# Authentication setting
|
|
auth_settings = [] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v2/memos/name/{name}', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V2GetMemoByNameResponse', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=params.get('async_req'),
|
|
_return_http_data_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 memo_service_get_user_memos_stats(self, **kwargs): # noqa: E501
|
|
"""GetUserMemosStats gets stats of memos 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.memo_service_get_user_memos_stats(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param str name: name is the name of the user to get stats for. Format: users/{username}
|
|
:param str timezone: timezone location Format: uses tz identifier https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
|
:param str filter: Same as ListMemosRequest.filter
|
|
:return: V2GetUserMemosStatsResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('async_req'):
|
|
return self.memo_service_get_user_memos_stats_with_http_info(**kwargs) # noqa: E501
|
|
else:
|
|
(data) = self.memo_service_get_user_memos_stats_with_http_info(**kwargs) # noqa: E501
|
|
return data
|
|
|
|
def memo_service_get_user_memos_stats_with_http_info(self, **kwargs): # noqa: E501
|
|
"""GetUserMemosStats gets stats of memos 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.memo_service_get_user_memos_stats_with_http_info(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param str name: name is the name of the user to get stats for. Format: users/{username}
|
|
:param str timezone: timezone location Format: uses tz identifier https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
|
:param str filter: Same as ListMemosRequest.filter
|
|
:return: V2GetUserMemosStatsResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['name', 'timezone', 'filter'] # noqa: E501
|
|
all_params.append('async_req')
|
|
all_params.append('_return_http_data_only')
|
|
all_params.append('_preload_content')
|
|
all_params.append('_request_timeout')
|
|
|
|
params = locals()
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
if key not in all_params:
|
|
raise TypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method memo_service_get_user_memos_stats" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
if 'name' in params:
|
|
query_params.append(('name', params['name'])) # noqa: E501
|
|
if 'timezone' in params:
|
|
query_params.append(('timezone', params['timezone'])) # noqa: E501
|
|
if 'filter' in params:
|
|
query_params.append(('filter', params['filter'])) # 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
|
|
|
|
# Authentication setting
|
|
auth_settings = [] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v2/memos/stats', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V2GetUserMemosStatsResponse', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=params.get('async_req'),
|
|
_return_http_data_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 memo_service_list_memo_comments(self, id, **kwargs): # noqa: E501
|
|
"""ListMemoComments lists comments for a memo. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_list_memo_comments(id, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param int id: (required)
|
|
:return: V2ListMemoCommentsResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('async_req'):
|
|
return self.memo_service_list_memo_comments_with_http_info(id, **kwargs) # noqa: E501
|
|
else:
|
|
(data) = self.memo_service_list_memo_comments_with_http_info(id, **kwargs) # noqa: E501
|
|
return data
|
|
|
|
def memo_service_list_memo_comments_with_http_info(self, id, **kwargs): # noqa: E501
|
|
"""ListMemoComments lists comments for a memo. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_list_memo_comments_with_http_info(id, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param int id: (required)
|
|
:return: V2ListMemoCommentsResponse
|
|
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 memo_service_list_memo_comments" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# verify the required parameter 'id' is set
|
|
if ('id' not in params or
|
|
params['id'] is None):
|
|
raise ValueError("Missing the required parameter `id` when calling `memo_service_list_memo_comments`") # 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
|
|
|
|
# Authentication setting
|
|
auth_settings = [] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v2/memos/{id}/comments', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V2ListMemoCommentsResponse', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=params.get('async_req'),
|
|
_return_http_data_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 memo_service_list_memo_reactions(self, id, **kwargs): # noqa: E501
|
|
"""ListMemoReactions lists reactions for a memo. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_list_memo_reactions(id, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param int id: (required)
|
|
:return: V2ListMemoReactionsResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('async_req'):
|
|
return self.memo_service_list_memo_reactions_with_http_info(id, **kwargs) # noqa: E501
|
|
else:
|
|
(data) = self.memo_service_list_memo_reactions_with_http_info(id, **kwargs) # noqa: E501
|
|
return data
|
|
|
|
def memo_service_list_memo_reactions_with_http_info(self, id, **kwargs): # noqa: E501
|
|
"""ListMemoReactions lists reactions for a memo. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_list_memo_reactions_with_http_info(id, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param int id: (required)
|
|
:return: V2ListMemoReactionsResponse
|
|
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 memo_service_list_memo_reactions" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# verify the required parameter 'id' is set
|
|
if ('id' not in params or
|
|
params['id'] is None):
|
|
raise ValueError("Missing the required parameter `id` when calling `memo_service_list_memo_reactions`") # 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
|
|
|
|
# Authentication setting
|
|
auth_settings = [] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v2/memos/{id}/reactions', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V2ListMemoReactionsResponse', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=params.get('async_req'),
|
|
_return_http_data_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 memo_service_list_memo_relations(self, id, **kwargs): # noqa: E501
|
|
"""ListMemoRelations lists relations for a memo. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_list_memo_relations(id, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param int id: (required)
|
|
:return: V2ListMemoRelationsResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('async_req'):
|
|
return self.memo_service_list_memo_relations_with_http_info(id, **kwargs) # noqa: E501
|
|
else:
|
|
(data) = self.memo_service_list_memo_relations_with_http_info(id, **kwargs) # noqa: E501
|
|
return data
|
|
|
|
def memo_service_list_memo_relations_with_http_info(self, id, **kwargs): # noqa: E501
|
|
"""ListMemoRelations lists relations for a memo. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_list_memo_relations_with_http_info(id, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param int id: (required)
|
|
:return: V2ListMemoRelationsResponse
|
|
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 memo_service_list_memo_relations" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# verify the required parameter 'id' is set
|
|
if ('id' not in params or
|
|
params['id'] is None):
|
|
raise ValueError("Missing the required parameter `id` when calling `memo_service_list_memo_relations`") # 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
|
|
|
|
# Authentication setting
|
|
auth_settings = [] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v2/memos/{id}/relations', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V2ListMemoRelationsResponse', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=params.get('async_req'),
|
|
_return_http_data_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 memo_service_list_memo_resources(self, id, **kwargs): # noqa: E501
|
|
"""ListMemoResources lists resources for a memo. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_list_memo_resources(id, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param int id: (required)
|
|
:return: V2ListMemoResourcesResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('async_req'):
|
|
return self.memo_service_list_memo_resources_with_http_info(id, **kwargs) # noqa: E501
|
|
else:
|
|
(data) = self.memo_service_list_memo_resources_with_http_info(id, **kwargs) # noqa: E501
|
|
return data
|
|
|
|
def memo_service_list_memo_resources_with_http_info(self, id, **kwargs): # noqa: E501
|
|
"""ListMemoResources lists resources for a memo. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_list_memo_resources_with_http_info(id, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param int id: (required)
|
|
:return: V2ListMemoResourcesResponse
|
|
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 memo_service_list_memo_resources" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# verify the required parameter 'id' is set
|
|
if ('id' not in params or
|
|
params['id'] is None):
|
|
raise ValueError("Missing the required parameter `id` when calling `memo_service_list_memo_resources`") # 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
|
|
|
|
# Authentication setting
|
|
auth_settings = [] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v2/memos/{id}/resources', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V2ListMemoResourcesResponse', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=params.get('async_req'),
|
|
_return_http_data_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 memo_service_list_memos(self, **kwargs): # noqa: E501
|
|
"""ListMemos lists memos with pagination and filter. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_list_memos(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param int page_size: The maximum number of memos to return.
|
|
:param str page_token: A page token, received from a previous `ListMemos` call. Provide this to retrieve the subsequent page.
|
|
:param str filter: Filter is used to filter memos returned in the list. Format: \"creator == users/{username} && visibilities == ['PUBLIC', 'PROTECTED']\"
|
|
:return: V2ListMemosResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('async_req'):
|
|
return self.memo_service_list_memos_with_http_info(**kwargs) # noqa: E501
|
|
else:
|
|
(data) = self.memo_service_list_memos_with_http_info(**kwargs) # noqa: E501
|
|
return data
|
|
|
|
def memo_service_list_memos_with_http_info(self, **kwargs): # noqa: E501
|
|
"""ListMemos lists memos with pagination and filter. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_list_memos_with_http_info(async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param int page_size: The maximum number of memos to return.
|
|
:param str page_token: A page token, received from a previous `ListMemos` call. Provide this to retrieve the subsequent page.
|
|
:param str filter: Filter is used to filter memos returned in the list. Format: \"creator == users/{username} && visibilities == ['PUBLIC', 'PROTECTED']\"
|
|
:return: V2ListMemosResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['page_size', 'page_token', 'filter'] # noqa: E501
|
|
all_params.append('async_req')
|
|
all_params.append('_return_http_data_only')
|
|
all_params.append('_preload_content')
|
|
all_params.append('_request_timeout')
|
|
|
|
params = locals()
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
if key not in all_params:
|
|
raise TypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method memo_service_list_memos" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
|
|
query_params = []
|
|
if 'page_size' in params:
|
|
query_params.append(('pageSize', params['page_size'])) # noqa: E501
|
|
if 'page_token' in params:
|
|
query_params.append(('pageToken', params['page_token'])) # noqa: E501
|
|
if 'filter' in params:
|
|
query_params.append(('filter', params['filter'])) # 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
|
|
|
|
# Authentication setting
|
|
auth_settings = [] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v2/memos', 'GET',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V2ListMemosResponse', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=params.get('async_req'),
|
|
_return_http_data_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 memo_service_set_memo_relations(self, body, id, **kwargs): # noqa: E501
|
|
"""SetMemoRelations sets relations for a memo. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_set_memo_relations(body, id, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param MemoServiceSetMemoRelationsBody body: (required)
|
|
:param int id: (required)
|
|
:return: V2SetMemoRelationsResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('async_req'):
|
|
return self.memo_service_set_memo_relations_with_http_info(body, id, **kwargs) # noqa: E501
|
|
else:
|
|
(data) = self.memo_service_set_memo_relations_with_http_info(body, id, **kwargs) # noqa: E501
|
|
return data
|
|
|
|
def memo_service_set_memo_relations_with_http_info(self, body, id, **kwargs): # noqa: E501
|
|
"""SetMemoRelations sets relations for a memo. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_set_memo_relations_with_http_info(body, id, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param MemoServiceSetMemoRelationsBody body: (required)
|
|
:param int id: (required)
|
|
:return: V2SetMemoRelationsResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['body', '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 memo_service_set_memo_relations" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params or
|
|
params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `memo_service_set_memo_relations`") # noqa: E501
|
|
# verify the required parameter 'id' is set
|
|
if ('id' not in params or
|
|
params['id'] is None):
|
|
raise ValueError("Missing the required parameter `id` when calling `memo_service_set_memo_relations`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'id' in params:
|
|
path_params['id'] = params['id'] # noqa: E501
|
|
|
|
query_params = []
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = [] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v2/memos/{id}/relations', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V2SetMemoRelationsResponse', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=params.get('async_req'),
|
|
_return_http_data_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 memo_service_set_memo_resources(self, body, id, **kwargs): # noqa: E501
|
|
"""SetMemoResources sets resources for a memo. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_set_memo_resources(body, id, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param MemoServiceSetMemoResourcesBody body: (required)
|
|
:param int id: (required)
|
|
:return: V2SetMemoResourcesResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('async_req'):
|
|
return self.memo_service_set_memo_resources_with_http_info(body, id, **kwargs) # noqa: E501
|
|
else:
|
|
(data) = self.memo_service_set_memo_resources_with_http_info(body, id, **kwargs) # noqa: E501
|
|
return data
|
|
|
|
def memo_service_set_memo_resources_with_http_info(self, body, id, **kwargs): # noqa: E501
|
|
"""SetMemoResources sets resources for a memo. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_set_memo_resources_with_http_info(body, id, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param MemoServiceSetMemoResourcesBody body: (required)
|
|
:param int id: (required)
|
|
:return: V2SetMemoResourcesResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['body', '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 memo_service_set_memo_resources" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params or
|
|
params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `memo_service_set_memo_resources`") # noqa: E501
|
|
# verify the required parameter 'id' is set
|
|
if ('id' not in params or
|
|
params['id'] is None):
|
|
raise ValueError("Missing the required parameter `id` when calling `memo_service_set_memo_resources`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'id' in params:
|
|
path_params['id'] = params['id'] # noqa: E501
|
|
|
|
query_params = []
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = [] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v2/memos/{id}/resources', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V2SetMemoResourcesResponse', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=params.get('async_req'),
|
|
_return_http_data_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 memo_service_update_memo(self, body, memo_id, **kwargs): # noqa: E501
|
|
"""UpdateMemo updates a memo. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_update_memo(body, memo_id, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param MemosMemoIdBody body: (required)
|
|
:param int memo_id: id is the system generated unique identifier. (required)
|
|
:return: V2UpdateMemoResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('async_req'):
|
|
return self.memo_service_update_memo_with_http_info(body, memo_id, **kwargs) # noqa: E501
|
|
else:
|
|
(data) = self.memo_service_update_memo_with_http_info(body, memo_id, **kwargs) # noqa: E501
|
|
return data
|
|
|
|
def memo_service_update_memo_with_http_info(self, body, memo_id, **kwargs): # noqa: E501
|
|
"""UpdateMemo updates a memo. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_update_memo_with_http_info(body, memo_id, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param MemosMemoIdBody body: (required)
|
|
:param int memo_id: id is the system generated unique identifier. (required)
|
|
:return: V2UpdateMemoResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['body', 'memo_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 memo_service_update_memo" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# verify the required parameter 'body' is set
|
|
if ('body' not in params or
|
|
params['body'] is None):
|
|
raise ValueError("Missing the required parameter `body` when calling `memo_service_update_memo`") # noqa: E501
|
|
# verify the required parameter 'memo_id' is set
|
|
if ('memo_id' not in params or
|
|
params['memo_id'] is None):
|
|
raise ValueError("Missing the required parameter `memo_id` when calling `memo_service_update_memo`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'memo_id' in params:
|
|
path_params['memo.id'] = params['memo_id'] # noqa: E501
|
|
|
|
query_params = []
|
|
|
|
header_params = {}
|
|
|
|
form_params = []
|
|
local_var_files = {}
|
|
|
|
body_params = None
|
|
if 'body' in params:
|
|
body_params = params['body']
|
|
# HTTP header `Accept`
|
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
['application/json']) # noqa: E501
|
|
|
|
# HTTP header `Content-Type`
|
|
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
['application/json']) # noqa: E501
|
|
|
|
# Authentication setting
|
|
auth_settings = [] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v2/memos/{memo.id}', 'PATCH',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V2UpdateMemoResponse', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=params.get('async_req'),
|
|
_return_http_data_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 memo_service_upsert_memo_reaction(self, id, **kwargs): # noqa: E501
|
|
"""UpsertMemoReaction upserts a reaction for a memo. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_upsert_memo_reaction(id, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param int id: (required)
|
|
:param int reaction_id:
|
|
:param str reaction_creator:
|
|
:param str reaction_content_id:
|
|
:param str reaction_reaction_type:
|
|
:return: V2UpsertMemoReactionResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
kwargs['_return_http_data_only'] = True
|
|
if kwargs.get('async_req'):
|
|
return self.memo_service_upsert_memo_reaction_with_http_info(id, **kwargs) # noqa: E501
|
|
else:
|
|
(data) = self.memo_service_upsert_memo_reaction_with_http_info(id, **kwargs) # noqa: E501
|
|
return data
|
|
|
|
def memo_service_upsert_memo_reaction_with_http_info(self, id, **kwargs): # noqa: E501
|
|
"""UpsertMemoReaction upserts a reaction for a memo. # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass async_req=True
|
|
>>> thread = api.memo_service_upsert_memo_reaction_with_http_info(id, async_req=True)
|
|
>>> result = thread.get()
|
|
|
|
:param async_req bool
|
|
:param int id: (required)
|
|
:param int reaction_id:
|
|
:param str reaction_creator:
|
|
:param str reaction_content_id:
|
|
:param str reaction_reaction_type:
|
|
:return: V2UpsertMemoReactionResponse
|
|
If the method is called asynchronously,
|
|
returns the request thread.
|
|
"""
|
|
|
|
all_params = ['id', 'reaction_id', 'reaction_creator', 'reaction_content_id', 'reaction_reaction_type'] # noqa: E501
|
|
all_params.append('async_req')
|
|
all_params.append('_return_http_data_only')
|
|
all_params.append('_preload_content')
|
|
all_params.append('_request_timeout')
|
|
|
|
params = locals()
|
|
for key, val in six.iteritems(params['kwargs']):
|
|
if key not in all_params:
|
|
raise TypeError(
|
|
"Got an unexpected keyword argument '%s'"
|
|
" to method memo_service_upsert_memo_reaction" % key
|
|
)
|
|
params[key] = val
|
|
del params['kwargs']
|
|
# verify the required parameter 'id' is set
|
|
if ('id' not in params or
|
|
params['id'] is None):
|
|
raise ValueError("Missing the required parameter `id` when calling `memo_service_upsert_memo_reaction`") # noqa: E501
|
|
|
|
collection_formats = {}
|
|
|
|
path_params = {}
|
|
if 'id' in params:
|
|
path_params['id'] = params['id'] # noqa: E501
|
|
|
|
query_params = []
|
|
if 'reaction_id' in params:
|
|
query_params.append(('reaction.id', params['reaction_id'])) # noqa: E501
|
|
if 'reaction_creator' in params:
|
|
query_params.append(('reaction.creator', params['reaction_creator'])) # noqa: E501
|
|
if 'reaction_content_id' in params:
|
|
query_params.append(('reaction.contentId', params['reaction_content_id'])) # noqa: E501
|
|
if 'reaction_reaction_type' in params:
|
|
query_params.append(('reaction.reactionType', params['reaction_reaction_type'])) # 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
|
|
|
|
# Authentication setting
|
|
auth_settings = [] # noqa: E501
|
|
|
|
return self.api_client.call_api(
|
|
'/api/v2/memos/{id}/reactions', 'POST',
|
|
path_params,
|
|
query_params,
|
|
header_params,
|
|
body=body_params,
|
|
post_params=form_params,
|
|
files=local_var_files,
|
|
response_type='V2UpsertMemoReactionResponse', # noqa: E501
|
|
auth_settings=auth_settings,
|
|
async_req=params.get('async_req'),
|
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
_preload_content=params.get('_preload_content', True),
|
|
_request_timeout=params.get('_request_timeout'),
|
|
collection_formats=collection_formats)
|