Skip to content

Remove obsolete feature: Audience Match #744

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 20, 2025
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,6 @@ tmp/
*.iml

.openapi-generator

# github workflow
pr_info.json
2 changes: 1 addition & 1 deletion line-openapi
Submodule line-openapi updated 1 files
+0 −43 messaging-api.yml
1 change: 0 additions & 1 deletion linebot/v3/messaging/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
from linebot.v3.messaging.models.app_type_demographic_filter import AppTypeDemographicFilter
from linebot.v3.messaging.models.area_demographic import AreaDemographic
from linebot.v3.messaging.models.area_demographic_filter import AreaDemographicFilter
from linebot.v3.messaging.models.audience_match_messages_request import AudienceMatchMessagesRequest
from linebot.v3.messaging.models.audience_recipient import AudienceRecipient
from linebot.v3.messaging.models.audio_message import AudioMessage
from linebot.v3.messaging.models.bot_info_response import BotInfoResponse
Expand Down
153 changes: 0 additions & 153 deletions linebot/v3/messaging/api/async_messaging_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

from typing import Any, Dict, Optional

from linebot.v3.messaging.models.audience_match_messages_request import AudienceMatchMessagesRequest
from linebot.v3.messaging.models.bot_info_response import BotInfoResponse
from linebot.v3.messaging.models.broadcast_request import BroadcastRequest
from linebot.v3.messaging.models.create_rich_menu_alias_request import CreateRichMenuAliasRequest
Expand Down Expand Up @@ -93,158 +92,6 @@ def __init__(self, api_client=None):
self.line_base_path = "https://api.line.me"


@overload
async def audience_match(self, audience_match_messages_request : AudienceMatchMessagesRequest, **kwargs) -> None: # noqa: E501
...

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

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

Send a message 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.audience_match(audience_match_messages_request, async_req=True)
>>> result = thread.get()

:param audience_match_messages_request: (required)
:type audience_match_messages_request: AudienceMatchMessagesRequest
: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 audience_match_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.audience_match_with_http_info(audience_match_messages_request, **kwargs) # noqa: E501

@validate_arguments
def audience_match_with_http_info(self, audience_match_messages_request : AudienceMatchMessagesRequest, **kwargs) -> ApiResponse: # noqa: E501
"""audience_match # noqa: E501

Send a message 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.audience_match_with_http_info(audience_match_messages_request, async_req=True)
>>> result = thread.get()

:param audience_match_messages_request: (required)
:type audience_match_messages_request: AudienceMatchMessagesRequest
: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 = [
'audience_match_messages_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 audience_match" % _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['audience_match_messages_request'] is not None:
_body_params = _params['audience_match_messages_request']

# 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(
'/bot/ad/multicast/phone', '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 broadcast(self, broadcast_request : BroadcastRequest, 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
143 changes: 0 additions & 143 deletions linebot/v3/messaging/api/messaging_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

from typing import Any, Dict, Optional

from linebot.v3.messaging.models.audience_match_messages_request import AudienceMatchMessagesRequest
from linebot.v3.messaging.models.bot_info_response import BotInfoResponse
from linebot.v3.messaging.models.broadcast_request import BroadcastRequest
from linebot.v3.messaging.models.create_rich_menu_alias_request import CreateRichMenuAliasRequest
Expand Down Expand Up @@ -91,148 +90,6 @@ def __init__(self, api_client=None):
self.line_base_path = "https://api.line.me"


@validate_arguments
def audience_match(self, audience_match_messages_request : AudienceMatchMessagesRequest, **kwargs) -> None: # noqa: E501
"""audience_match # noqa: E501

Send a message 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.audience_match(audience_match_messages_request, async_req=True)
>>> result = thread.get()

:param audience_match_messages_request: (required)
:type audience_match_messages_request: AudienceMatchMessagesRequest
: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 audience_match_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.audience_match_with_http_info(audience_match_messages_request, **kwargs) # noqa: E501

@validate_arguments
def audience_match_with_http_info(self, audience_match_messages_request : AudienceMatchMessagesRequest, **kwargs) -> ApiResponse: # noqa: E501
"""audience_match # noqa: E501

Send a message 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.audience_match_with_http_info(audience_match_messages_request, async_req=True)
>>> result = thread.get()

:param audience_match_messages_request: (required)
:type audience_match_messages_request: AudienceMatchMessagesRequest
: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 = [
'audience_match_messages_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 audience_match" % _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['audience_match_messages_request'] is not None:
_body_params = _params['audience_match_messages_request']

# 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(
'/bot/ad/multicast/phone', '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 broadcast(self, broadcast_request : BroadcastRequest, 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
"""broadcast # noqa: E501
Expand Down
Loading
Loading