diff --git a/line-openapi b/line-openapi index 5ae51b6a..950521ed 160000 --- a/line-openapi +++ b/line-openapi @@ -1 +1 @@ -Subproject commit 5ae51b6a91aea5da364666cdc60d24919ad0b6ad +Subproject commit 950521edd0f5a4508277a3f7e73563bf040aac0f diff --git a/linebot/v3/messaging/api/async_messaging_api.py b/linebot/v3/messaging/api/async_messaging_api.py index 6735a609..3fa62c2c 100644 --- a/linebot/v3/messaging/api/async_messaging_api.py +++ b/linebot/v3/messaging/api/async_messaging_api.py @@ -1007,157 +1007,6 @@ def delete_rich_menu_alias_with_http_info(self, rich_menu_alias_id : Annotated[S collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def get_ad_phone_message_statistics(self, var_date : Annotated[StrictStr, Field(..., description="Date the message was sent Format: `yyyyMMdd` (e.g. `20190831`) Time Zone: UTC+9 ")], **kwargs) -> NumberOfMessagesResponse: # noqa: E501 - ... - - @overload - def get_ad_phone_message_statistics(self, var_date : Annotated[StrictStr, Field(..., description="Date the message was sent Format: `yyyyMMdd` (e.g. `20190831`) Time Zone: UTC+9 ")], async_req: Optional[bool]=True, **kwargs) -> NumberOfMessagesResponse: # noqa: E501 - ... - - @validate_arguments - def get_ad_phone_message_statistics(self, var_date : Annotated[StrictStr, Field(..., description="Date the message was sent Format: `yyyyMMdd` (e.g. `20190831`) Time Zone: UTC+9 ")], async_req: Optional[bool]=None, **kwargs) -> Union[NumberOfMessagesResponse, Awaitable[NumberOfMessagesResponse]]: # noqa: E501 - """get_ad_phone_message_statistics # noqa: E501 - - Get result of message delivery using phone number # 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_ad_phone_message_statistics(var_date, async_req=True) - >>> result = thread.get() - - :param var_date: Date the message was sent Format: `yyyyMMdd` (e.g. `20190831`) Time Zone: UTC+9 (required) - :type var_date: str - :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: NumberOfMessagesResponse - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_ad_phone_message_statistics_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.get_ad_phone_message_statistics_with_http_info(var_date, **kwargs) # noqa: E501 - - @validate_arguments - def get_ad_phone_message_statistics_with_http_info(self, var_date : Annotated[StrictStr, Field(..., description="Date the message was sent Format: `yyyyMMdd` (e.g. `20190831`) Time Zone: UTC+9 ")], **kwargs) -> ApiResponse: # noqa: E501 - """get_ad_phone_message_statistics # noqa: E501 - - Get result of message delivery using phone number # 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_ad_phone_message_statistics_with_http_info(var_date, async_req=True) - >>> result = thread.get() - - :param var_date: Date the message was sent Format: `yyyyMMdd` (e.g. `20190831`) Time Zone: UTC+9 (required) - :type var_date: str - :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: tuple(NumberOfMessagesResponse, status_code(int), headers(HTTPHeaderDict)) - """ - - _host = self.line_base_path - _params = locals() - - _all_params = [ - 'var_date' - ] - _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 get_ad_phone_message_statistics" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - if _params.get('var_date') is not None: # noqa: E501 - _query_params.append(('date', _params['var_date'])) - - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "NumberOfMessagesResponse", - } - - return self.api_client.call_api( - '/v2/bot/message/delivery/ad_phone', 'GET', - _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 get_aggregation_unit_name_list(self, limit : Annotated[Optional[StrictStr], Field(description="The maximum number of aggregation units you can get per request. ")] = None, start : Annotated[Optional[StrictStr], Field(description="Value of the continuation token found in the next property of the JSON object returned in the response. If you can't get all the aggregation units in one request, include this parameter to get the remaining array. ")] = None, **kwargs) -> GetAggregationUnitNameListResponse: # noqa: E501 ... diff --git a/linebot/v3/messaging/api/messaging_api.py b/linebot/v3/messaging/api/messaging_api.py index b56840fc..ddb354e8 100644 --- a/linebot/v3/messaging/api/messaging_api.py +++ b/linebot/v3/messaging/api/messaging_api.py @@ -945,147 +945,6 @@ def delete_rich_menu_alias_with_http_info(self, rich_menu_alias_id : Annotated[S collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @validate_arguments - def get_ad_phone_message_statistics(self, var_date : Annotated[StrictStr, Field(..., description="Date the message was sent Format: `yyyyMMdd` (e.g. `20190831`) Time Zone: UTC+9 ")], **kwargs) -> NumberOfMessagesResponse: # noqa: E501 - """get_ad_phone_message_statistics # noqa: E501 - - Get result of message delivery using phone number # 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_ad_phone_message_statistics(var_date, async_req=True) - >>> result = thread.get() - - :param var_date: Date the message was sent Format: `yyyyMMdd` (e.g. `20190831`) Time Zone: UTC+9 (required) - :type var_date: str - :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: NumberOfMessagesResponse - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_ad_phone_message_statistics_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_ad_phone_message_statistics_with_http_info(var_date, **kwargs) # noqa: E501 - - @validate_arguments - def get_ad_phone_message_statistics_with_http_info(self, var_date : Annotated[StrictStr, Field(..., description="Date the message was sent Format: `yyyyMMdd` (e.g. `20190831`) Time Zone: UTC+9 ")], **kwargs) -> ApiResponse: # noqa: E501 - """get_ad_phone_message_statistics # noqa: E501 - - Get result of message delivery using phone number # 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_ad_phone_message_statistics_with_http_info(var_date, async_req=True) - >>> result = thread.get() - - :param var_date: Date the message was sent Format: `yyyyMMdd` (e.g. `20190831`) Time Zone: UTC+9 (required) - :type var_date: str - :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: tuple(NumberOfMessagesResponse, status_code(int), headers(HTTPHeaderDict)) - """ - - _host = self.line_base_path - _params = locals() - - _all_params = [ - 'var_date' - ] - _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 get_ad_phone_message_statistics" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - if _params.get('var_date') is not None: # noqa: E501 - _query_params.append(('date', _params['var_date'])) - - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "NumberOfMessagesResponse", - } - - return self.api_client.call_api( - '/v2/bot/message/delivery/ad_phone', 'GET', - _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 get_aggregation_unit_name_list(self, limit : Annotated[Optional[StrictStr], Field(description="The maximum number of aggregation units you can get per request. ")] = None, start : Annotated[Optional[StrictStr], Field(description="Value of the continuation token found in the next property of the JSON object returned in the response. If you can't get all the aggregation units in one request, include this parameter to get the remaining array. ")] = None, **kwargs) -> GetAggregationUnitNameListResponse: # noqa: E501 """get_aggregation_unit_name_list # noqa: E501 diff --git a/linebot/v3/messaging/docs/MessagingApi.md b/linebot/v3/messaging/docs/MessagingApi.md index 45faed47..d8476b96 100644 --- a/linebot/v3/messaging/docs/MessagingApi.md +++ b/linebot/v3/messaging/docs/MessagingApi.md @@ -10,7 +10,6 @@ Method | HTTP request | Description [**create_rich_menu_alias**](MessagingApi.md#create_rich_menu_alias) | **POST** /v2/bot/richmenu/alias | [**delete_rich_menu**](MessagingApi.md#delete_rich_menu) | **DELETE** /v2/bot/richmenu/{richMenuId} | [**delete_rich_menu_alias**](MessagingApi.md#delete_rich_menu_alias) | **DELETE** /v2/bot/richmenu/alias/{richMenuAliasId} | -[**get_ad_phone_message_statistics**](MessagingApi.md#get_ad_phone_message_statistics) | **GET** /v2/bot/message/delivery/ad_phone | [**get_aggregation_unit_name_list**](MessagingApi.md#get_aggregation_unit_name_list) | **GET** /v2/bot/message/aggregation/list | [**get_aggregation_unit_usage**](MessagingApi.md#get_aggregation_unit_usage) | **GET** /v2/bot/message/aggregation/info | [**get_bot_info**](MessagingApi.md#get_bot_info) | **GET** /v2/bot/info | @@ -513,81 +512,6 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_ad_phone_message_statistics** -> NumberOfMessagesResponse get_ad_phone_message_statistics(var_date) - - - -Get result of message delivery using phone number - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import linebot.v3.messaging -from linebot.v3.messaging.models.number_of_messages_response import NumberOfMessagesResponse -from linebot.v3.messaging.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.line.me -# See configuration.py for a list of all supported configuration parameters. -configuration = linebot.v3.messaging.Configuration( - host = "https://api.line.me" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = linebot.v3.messaging.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with linebot.v3.messaging.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = linebot.v3.messaging.MessagingApi(api_client) - var_date = 'var_date_example' # str | Date the message was sent Format: `yyyyMMdd` (e.g. `20190831`) Time Zone: UTC+9 - - try: - api_response = api_instance.get_ad_phone_message_statistics(var_date) - print("The response of MessagingApi->get_ad_phone_message_statistics:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MessagingApi->get_ad_phone_message_statistics: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **var_date** | **str**| Date the message was sent Format: `yyyyMMdd` (e.g. `20190831`) Time Zone: UTC+9 | - -### Return type - -[**NumberOfMessagesResponse**](NumberOfMessagesResponse.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - # **get_aggregation_unit_name_list** > GetAggregationUnitNameListResponse get_aggregation_unit_name_list(limit=limit, start=start)