Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion line-openapi
1 change: 1 addition & 0 deletions linebot/v3/messaging/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
from linebot.v3.messaging.models.location_message import LocationMessage
from linebot.v3.messaging.models.lottery_acquisition_condition_request import LotteryAcquisitionConditionRequest
from linebot.v3.messaging.models.lottery_acquisition_condition_response import LotteryAcquisitionConditionResponse
from linebot.v3.messaging.models.mark_messages_as_read_by_token_request import MarkMessagesAsReadByTokenRequest
from linebot.v3.messaging.models.mark_messages_as_read_request import MarkMessagesAsReadRequest
from linebot.v3.messaging.models.members_ids_response import MembersIdsResponse
from linebot.v3.messaging.models.membership import Membership
Expand Down
157 changes: 157 additions & 0 deletions linebot/v3/messaging/api/async_messaging_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
from linebot.v3.messaging.models.group_summary_response import GroupSummaryResponse
from linebot.v3.messaging.models.group_user_profile_response import GroupUserProfileResponse
from linebot.v3.messaging.models.issue_link_token_response import IssueLinkTokenResponse
from linebot.v3.messaging.models.mark_messages_as_read_by_token_request import MarkMessagesAsReadByTokenRequest
from linebot.v3.messaging.models.mark_messages_as_read_request import MarkMessagesAsReadRequest
from linebot.v3.messaging.models.members_ids_response import MembersIdsResponse
from linebot.v3.messaging.models.membership_list_response import MembershipListResponse
Expand Down Expand Up @@ -7222,6 +7223,162 @@ def mark_messages_as_read_with_http_info(self, mark_messages_as_read_request : M
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))

@overload
async def mark_messages_as_read_by_token(self, mark_messages_as_read_by_token_request : MarkMessagesAsReadByTokenRequest, **kwargs) -> None: # noqa: E501
...

@overload
def mark_messages_as_read_by_token(self, mark_messages_as_read_by_token_request : MarkMessagesAsReadByTokenRequest, async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501
...

@validate_arguments
def mark_messages_as_read_by_token(self, mark_messages_as_read_by_token_request : MarkMessagesAsReadByTokenRequest, async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501
"""mark_messages_as_read_by_token # noqa: E501

Mark messages from users as read by token # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True

>>> thread = api.mark_messages_as_read_by_token(mark_messages_as_read_by_token_request, async_req=True)
>>> result = thread.get()

:param mark_messages_as_read_by_token_request: (required)
:type mark_messages_as_read_by_token_request: MarkMessagesAsReadByTokenRequest
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: None
"""
kwargs['_return_http_data_only'] = True
if '_preload_content' in kwargs:
raise ValueError("Error! Please call the mark_messages_as_read_by_token_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
if async_req is not None:
kwargs['async_req'] = async_req
return self.mark_messages_as_read_by_token_with_http_info(mark_messages_as_read_by_token_request, **kwargs) # noqa: E501

@validate_arguments
def mark_messages_as_read_by_token_with_http_info(self, mark_messages_as_read_by_token_request : MarkMessagesAsReadByTokenRequest, **kwargs) -> ApiResponse: # noqa: E501
"""mark_messages_as_read_by_token # noqa: E501

Mark messages from users as read by token # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True

>>> thread = api.mark_messages_as_read_by_token_with_http_info(mark_messages_as_read_by_token_request, async_req=True)
>>> result = thread.get()

:param mark_messages_as_read_by_token_request: (required)
:type mark_messages_as_read_by_token_request: MarkMessagesAsReadByTokenRequest
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the ApiResponse.data will
be set to none and raw_data will store the
HTTP response body without reading/decoding.
Default is True.
:type _preload_content: bool, optional
:param _return_http_data_only: response data instead of ApiResponse
object with status code, headers, etc
:type _return_http_data_only: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: None
"""

_host = self.line_base_path
_params = locals()

_all_params = [
'mark_messages_as_read_by_token_request'
]
_all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth',
'_content_type',
'_headers'
]
)

# validate the arguments
for _key, _val in _params['kwargs'].items():
if _key not in _all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method mark_messages_as_read_by_token" % _key
)
_params[_key] = _val
del _params['kwargs']

_collection_formats = {}

# process the path parameters
_path_params = {}

# process the query parameters
_query_params = []
# process the header parameters
_header_params = dict(_params.get('_headers', {}))
# process the form parameters
_form_params = []
_files = {}
# process the body parameter
_body_params = None
if _params['mark_messages_as_read_by_token_request'] is not None:
_body_params = _params['mark_messages_as_read_by_token_request']

# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501

# set the HTTP header `Content-Type`
_content_types_list = _params.get('_content_type',
self.api_client.select_header_content_type(
['application/json']))
if _content_types_list:
_header_params['Content-Type'] = _content_types_list

# authentication setting
_auth_settings = ['Bearer'] # noqa: E501

_response_types_map = {}

return self.api_client.call_api(
'/v2/bot/chat/markAsRead', 'POST',
_path_params,
_query_params,
_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
response_types_map=_response_types_map,
auth_settings=_auth_settings,
async_req=_params.get('async_req'),
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
_preload_content=_params.get('_preload_content', True),
_request_timeout=_params.get('_request_timeout'),
_host=_host,
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))

@overload
async def multicast(self, multicast_request : MulticastRequest, x_line_retry_key : Annotated[Optional[StrictStr], Field(description="Retry key. Specifies the UUID in hexadecimal format (e.g., `123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn't generated by LINE. Each developer must generate their own retry key. ")] = None, **kwargs) -> object: # noqa: E501
...
Expand Down
147 changes: 147 additions & 0 deletions linebot/v3/messaging/api/messaging_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
from linebot.v3.messaging.models.group_summary_response import GroupSummaryResponse
from linebot.v3.messaging.models.group_user_profile_response import GroupUserProfileResponse
from linebot.v3.messaging.models.issue_link_token_response import IssueLinkTokenResponse
from linebot.v3.messaging.models.mark_messages_as_read_by_token_request import MarkMessagesAsReadByTokenRequest
from linebot.v3.messaging.models.mark_messages_as_read_request import MarkMessagesAsReadRequest
from linebot.v3.messaging.models.members_ids_response import MembersIdsResponse
from linebot.v3.messaging.models.membership_list_response import MembershipListResponse
Expand Down Expand Up @@ -6750,6 +6751,152 @@ def mark_messages_as_read_with_http_info(self, mark_messages_as_read_request : M
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))

@validate_arguments
def mark_messages_as_read_by_token(self, mark_messages_as_read_by_token_request : MarkMessagesAsReadByTokenRequest, **kwargs) -> None: # noqa: E501
"""mark_messages_as_read_by_token # noqa: E501

Mark messages from users as read by token # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True

>>> thread = api.mark_messages_as_read_by_token(mark_messages_as_read_by_token_request, async_req=True)
>>> result = thread.get()

:param mark_messages_as_read_by_token_request: (required)
:type mark_messages_as_read_by_token_request: MarkMessagesAsReadByTokenRequest
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: None
"""
kwargs['_return_http_data_only'] = True
if '_preload_content' in kwargs:
raise ValueError("Error! Please call the mark_messages_as_read_by_token_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.mark_messages_as_read_by_token_with_http_info(mark_messages_as_read_by_token_request, **kwargs) # noqa: E501

@validate_arguments
def mark_messages_as_read_by_token_with_http_info(self, mark_messages_as_read_by_token_request : MarkMessagesAsReadByTokenRequest, **kwargs) -> ApiResponse: # noqa: E501
"""mark_messages_as_read_by_token # noqa: E501

Mark messages from users as read by token # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True

>>> thread = api.mark_messages_as_read_by_token_with_http_info(mark_messages_as_read_by_token_request, async_req=True)
>>> result = thread.get()

:param mark_messages_as_read_by_token_request: (required)
:type mark_messages_as_read_by_token_request: MarkMessagesAsReadByTokenRequest
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the ApiResponse.data will
be set to none and raw_data will store the
HTTP response body without reading/decoding.
Default is True.
:type _preload_content: bool, optional
:param _return_http_data_only: response data instead of ApiResponse
object with status code, headers, etc
:type _return_http_data_only: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: None
"""

_host = self.line_base_path
_params = locals()

_all_params = [
'mark_messages_as_read_by_token_request'
]
_all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth',
'_content_type',
'_headers'
]
)

# validate the arguments
for _key, _val in _params['kwargs'].items():
if _key not in _all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method mark_messages_as_read_by_token" % _key
)
_params[_key] = _val
del _params['kwargs']

_collection_formats = {}

# process the path parameters
_path_params = {}

# process the query parameters
_query_params = []
# process the header parameters
_header_params = dict(_params.get('_headers', {}))
# process the form parameters
_form_params = []
_files = {}
# process the body parameter
_body_params = None
if _params['mark_messages_as_read_by_token_request'] is not None:
_body_params = _params['mark_messages_as_read_by_token_request']

# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501

# set the HTTP header `Content-Type`
_content_types_list = _params.get('_content_type',
self.api_client.select_header_content_type(
['application/json']))
if _content_types_list:
_header_params['Content-Type'] = _content_types_list

# authentication setting
_auth_settings = ['Bearer'] # noqa: E501

_response_types_map = {}

return self.api_client.call_api(
'/v2/bot/chat/markAsRead', 'POST',
_path_params,
_query_params,
_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
response_types_map=_response_types_map,
auth_settings=_auth_settings,
async_req=_params.get('async_req'),
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
_preload_content=_params.get('_preload_content', True),
_request_timeout=_params.get('_request_timeout'),
_host=_host,
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))

@validate_arguments
def multicast(self, multicast_request : MulticastRequest, x_line_retry_key : Annotated[Optional[StrictStr], Field(description="Retry key. Specifies the UUID in hexadecimal format (e.g., `123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn't generated by LINE. Each developer must generate their own retry key. ")] = None, **kwargs) -> object: # noqa: E501
"""multicast # noqa: E501
Expand Down
Loading