|
40 | 40 | from linebot.v3.messaging.models.group_summary_response import GroupSummaryResponse |
41 | 41 | from linebot.v3.messaging.models.group_user_profile_response import GroupUserProfileResponse |
42 | 42 | from linebot.v3.messaging.models.issue_link_token_response import IssueLinkTokenResponse |
| 43 | +from linebot.v3.messaging.models.mark_messages_as_read_by_token_request import MarkMessagesAsReadByTokenRequest |
43 | 44 | from linebot.v3.messaging.models.mark_messages_as_read_request import MarkMessagesAsReadRequest |
44 | 45 | from linebot.v3.messaging.models.members_ids_response import MembersIdsResponse |
45 | 46 | from linebot.v3.messaging.models.membership_list_response import MembershipListResponse |
@@ -7222,6 +7223,162 @@ def mark_messages_as_read_with_http_info(self, mark_messages_as_read_request : M |
7222 | 7223 | collection_formats=_collection_formats, |
7223 | 7224 | _request_auth=_params.get('_request_auth')) |
7224 | 7225 |
|
| 7226 | + @overload |
| 7227 | + async def mark_messages_as_read_by_token(self, mark_messages_as_read_by_token_request : MarkMessagesAsReadByTokenRequest, **kwargs) -> None: # noqa: E501 |
| 7228 | + ... |
| 7229 | + |
| 7230 | + @overload |
| 7231 | + 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 |
| 7232 | + ... |
| 7233 | + |
| 7234 | + @validate_arguments |
| 7235 | + 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 |
| 7236 | + """mark_messages_as_read_by_token # noqa: E501 |
| 7237 | +
|
| 7238 | + Mark messages from users as read by token # noqa: E501 |
| 7239 | + This method makes a synchronous HTTP request by default. To make an |
| 7240 | + asynchronous HTTP request, please pass async_req=True |
| 7241 | +
|
| 7242 | + >>> thread = api.mark_messages_as_read_by_token(mark_messages_as_read_by_token_request, async_req=True) |
| 7243 | + >>> result = thread.get() |
| 7244 | +
|
| 7245 | + :param mark_messages_as_read_by_token_request: (required) |
| 7246 | + :type mark_messages_as_read_by_token_request: MarkMessagesAsReadByTokenRequest |
| 7247 | + :param async_req: Whether to execute the request asynchronously. |
| 7248 | + :type async_req: bool, optional |
| 7249 | + :param _request_timeout: timeout setting for this request. If one |
| 7250 | + number provided, it will be total request |
| 7251 | + timeout. It can also be a pair (tuple) of |
| 7252 | + (connection, read) timeouts. |
| 7253 | + :return: Returns the result object. |
| 7254 | + If the method is called asynchronously, |
| 7255 | + returns the request thread. |
| 7256 | + :rtype: None |
| 7257 | + """ |
| 7258 | + kwargs['_return_http_data_only'] = True |
| 7259 | + if '_preload_content' in kwargs: |
| 7260 | + 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") |
| 7261 | + if async_req is not None: |
| 7262 | + kwargs['async_req'] = async_req |
| 7263 | + return self.mark_messages_as_read_by_token_with_http_info(mark_messages_as_read_by_token_request, **kwargs) # noqa: E501 |
| 7264 | + |
| 7265 | + @validate_arguments |
| 7266 | + def mark_messages_as_read_by_token_with_http_info(self, mark_messages_as_read_by_token_request : MarkMessagesAsReadByTokenRequest, **kwargs) -> ApiResponse: # noqa: E501 |
| 7267 | + """mark_messages_as_read_by_token # noqa: E501 |
| 7268 | +
|
| 7269 | + Mark messages from users as read by token # noqa: E501 |
| 7270 | + This method makes a synchronous HTTP request by default. To make an |
| 7271 | + asynchronous HTTP request, please pass async_req=True |
| 7272 | +
|
| 7273 | + >>> thread = api.mark_messages_as_read_by_token_with_http_info(mark_messages_as_read_by_token_request, async_req=True) |
| 7274 | + >>> result = thread.get() |
| 7275 | +
|
| 7276 | + :param mark_messages_as_read_by_token_request: (required) |
| 7277 | + :type mark_messages_as_read_by_token_request: MarkMessagesAsReadByTokenRequest |
| 7278 | + :param async_req: Whether to execute the request asynchronously. |
| 7279 | + :type async_req: bool, optional |
| 7280 | + :param _preload_content: if False, the ApiResponse.data will |
| 7281 | + be set to none and raw_data will store the |
| 7282 | + HTTP response body without reading/decoding. |
| 7283 | + Default is True. |
| 7284 | + :type _preload_content: bool, optional |
| 7285 | + :param _return_http_data_only: response data instead of ApiResponse |
| 7286 | + object with status code, headers, etc |
| 7287 | + :type _return_http_data_only: bool, optional |
| 7288 | + :param _request_timeout: timeout setting for this request. If one |
| 7289 | + number provided, it will be total request |
| 7290 | + timeout. It can also be a pair (tuple) of |
| 7291 | + (connection, read) timeouts. |
| 7292 | + :param _request_auth: set to override the auth_settings for an a single |
| 7293 | + request; this effectively ignores the authentication |
| 7294 | + in the spec for a single request. |
| 7295 | + :type _request_auth: dict, optional |
| 7296 | + :type _content_type: string, optional: force content-type for the request |
| 7297 | + :return: Returns the result object. |
| 7298 | + If the method is called asynchronously, |
| 7299 | + returns the request thread. |
| 7300 | + :rtype: None |
| 7301 | + """ |
| 7302 | + |
| 7303 | + _host = self.line_base_path |
| 7304 | + _params = locals() |
| 7305 | + |
| 7306 | + _all_params = [ |
| 7307 | + 'mark_messages_as_read_by_token_request' |
| 7308 | + ] |
| 7309 | + _all_params.extend( |
| 7310 | + [ |
| 7311 | + 'async_req', |
| 7312 | + '_return_http_data_only', |
| 7313 | + '_preload_content', |
| 7314 | + '_request_timeout', |
| 7315 | + '_request_auth', |
| 7316 | + '_content_type', |
| 7317 | + '_headers' |
| 7318 | + ] |
| 7319 | + ) |
| 7320 | + |
| 7321 | + # validate the arguments |
| 7322 | + for _key, _val in _params['kwargs'].items(): |
| 7323 | + if _key not in _all_params: |
| 7324 | + raise ApiTypeError( |
| 7325 | + "Got an unexpected keyword argument '%s'" |
| 7326 | + " to method mark_messages_as_read_by_token" % _key |
| 7327 | + ) |
| 7328 | + _params[_key] = _val |
| 7329 | + del _params['kwargs'] |
| 7330 | + |
| 7331 | + _collection_formats = {} |
| 7332 | + |
| 7333 | + # process the path parameters |
| 7334 | + _path_params = {} |
| 7335 | + |
| 7336 | + # process the query parameters |
| 7337 | + _query_params = [] |
| 7338 | + # process the header parameters |
| 7339 | + _header_params = dict(_params.get('_headers', {})) |
| 7340 | + # process the form parameters |
| 7341 | + _form_params = [] |
| 7342 | + _files = {} |
| 7343 | + # process the body parameter |
| 7344 | + _body_params = None |
| 7345 | + if _params['mark_messages_as_read_by_token_request'] is not None: |
| 7346 | + _body_params = _params['mark_messages_as_read_by_token_request'] |
| 7347 | + |
| 7348 | + # set the HTTP header `Accept` |
| 7349 | + _header_params['Accept'] = self.api_client.select_header_accept( |
| 7350 | + ['application/json']) # noqa: E501 |
| 7351 | + |
| 7352 | + # set the HTTP header `Content-Type` |
| 7353 | + _content_types_list = _params.get('_content_type', |
| 7354 | + self.api_client.select_header_content_type( |
| 7355 | + ['application/json'])) |
| 7356 | + if _content_types_list: |
| 7357 | + _header_params['Content-Type'] = _content_types_list |
| 7358 | + |
| 7359 | + # authentication setting |
| 7360 | + _auth_settings = ['Bearer'] # noqa: E501 |
| 7361 | + |
| 7362 | + _response_types_map = {} |
| 7363 | + |
| 7364 | + return self.api_client.call_api( |
| 7365 | + '/v2/bot/chat/markAsRead', 'POST', |
| 7366 | + _path_params, |
| 7367 | + _query_params, |
| 7368 | + _header_params, |
| 7369 | + body=_body_params, |
| 7370 | + post_params=_form_params, |
| 7371 | + files=_files, |
| 7372 | + response_types_map=_response_types_map, |
| 7373 | + auth_settings=_auth_settings, |
| 7374 | + async_req=_params.get('async_req'), |
| 7375 | + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 |
| 7376 | + _preload_content=_params.get('_preload_content', True), |
| 7377 | + _request_timeout=_params.get('_request_timeout'), |
| 7378 | + _host=_host, |
| 7379 | + collection_formats=_collection_formats, |
| 7380 | + _request_auth=_params.get('_request_auth')) |
| 7381 | + |
7225 | 7382 | @overload |
7226 | 7383 | 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 |
7227 | 7384 | ... |
|
0 commit comments