|
24 | 24 |
|
25 | 25 | from typing import Any, Dict, Optional
|
26 | 26 |
|
27 |
| -from linebot.v3.messaging.models.audience_match_messages_request import AudienceMatchMessagesRequest |
28 | 27 | from linebot.v3.messaging.models.bot_info_response import BotInfoResponse
|
29 | 28 | from linebot.v3.messaging.models.broadcast_request import BroadcastRequest
|
30 | 29 | from linebot.v3.messaging.models.create_rich_menu_alias_request import CreateRichMenuAliasRequest
|
@@ -93,158 +92,6 @@ def __init__(self, api_client=None):
|
93 | 92 | self.line_base_path = "https://api.line.me"
|
94 | 93 |
|
95 | 94 |
|
96 |
| - @overload |
97 |
| - async def audience_match(self, audience_match_messages_request : AudienceMatchMessagesRequest, **kwargs) -> None: # noqa: E501 |
98 |
| - ... |
99 |
| - |
100 |
| - @overload |
101 |
| - def audience_match(self, audience_match_messages_request : AudienceMatchMessagesRequest, async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 |
102 |
| - ... |
103 |
| - |
104 |
| - @validate_arguments |
105 |
| - def audience_match(self, audience_match_messages_request : AudienceMatchMessagesRequest, async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 |
106 |
| - """audience_match # noqa: E501 |
107 |
| -
|
108 |
| - Send a message using phone number # noqa: E501 |
109 |
| - This method makes a synchronous HTTP request by default. To make an |
110 |
| - asynchronous HTTP request, please pass async_req=True |
111 |
| -
|
112 |
| - >>> thread = api.audience_match(audience_match_messages_request, async_req=True) |
113 |
| - >>> result = thread.get() |
114 |
| -
|
115 |
| - :param audience_match_messages_request: (required) |
116 |
| - :type audience_match_messages_request: AudienceMatchMessagesRequest |
117 |
| - :param async_req: Whether to execute the request asynchronously. |
118 |
| - :type async_req: bool, optional |
119 |
| - :param _request_timeout: timeout setting for this request. If one |
120 |
| - number provided, it will be total request |
121 |
| - timeout. It can also be a pair (tuple) of |
122 |
| - (connection, read) timeouts. |
123 |
| - :return: Returns the result object. |
124 |
| - If the method is called asynchronously, |
125 |
| - returns the request thread. |
126 |
| - :rtype: None |
127 |
| - """ |
128 |
| - kwargs['_return_http_data_only'] = True |
129 |
| - if '_preload_content' in kwargs: |
130 |
| - raise ValueError("Error! Please call the audience_match_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") |
131 |
| - if async_req is not None: |
132 |
| - kwargs['async_req'] = async_req |
133 |
| - return self.audience_match_with_http_info(audience_match_messages_request, **kwargs) # noqa: E501 |
134 |
| - |
135 |
| - @validate_arguments |
136 |
| - def audience_match_with_http_info(self, audience_match_messages_request : AudienceMatchMessagesRequest, **kwargs) -> ApiResponse: # noqa: E501 |
137 |
| - """audience_match # noqa: E501 |
138 |
| -
|
139 |
| - Send a message using phone number # noqa: E501 |
140 |
| - This method makes a synchronous HTTP request by default. To make an |
141 |
| - asynchronous HTTP request, please pass async_req=True |
142 |
| -
|
143 |
| - >>> thread = api.audience_match_with_http_info(audience_match_messages_request, async_req=True) |
144 |
| - >>> result = thread.get() |
145 |
| -
|
146 |
| - :param audience_match_messages_request: (required) |
147 |
| - :type audience_match_messages_request: AudienceMatchMessagesRequest |
148 |
| - :param async_req: Whether to execute the request asynchronously. |
149 |
| - :type async_req: bool, optional |
150 |
| - :param _preload_content: if False, the ApiResponse.data will |
151 |
| - be set to none and raw_data will store the |
152 |
| - HTTP response body without reading/decoding. |
153 |
| - Default is True. |
154 |
| - :type _preload_content: bool, optional |
155 |
| - :param _return_http_data_only: response data instead of ApiResponse |
156 |
| - object with status code, headers, etc |
157 |
| - :type _return_http_data_only: bool, optional |
158 |
| - :param _request_timeout: timeout setting for this request. If one |
159 |
| - number provided, it will be total request |
160 |
| - timeout. It can also be a pair (tuple) of |
161 |
| - (connection, read) timeouts. |
162 |
| - :param _request_auth: set to override the auth_settings for an a single |
163 |
| - request; this effectively ignores the authentication |
164 |
| - in the spec for a single request. |
165 |
| - :type _request_auth: dict, optional |
166 |
| - :type _content_type: string, optional: force content-type for the request |
167 |
| - :return: Returns the result object. |
168 |
| - If the method is called asynchronously, |
169 |
| - returns the request thread. |
170 |
| - :rtype: None |
171 |
| - """ |
172 |
| - |
173 |
| - _host = self.line_base_path |
174 |
| - _params = locals() |
175 |
| - |
176 |
| - _all_params = [ |
177 |
| - 'audience_match_messages_request' |
178 |
| - ] |
179 |
| - _all_params.extend( |
180 |
| - [ |
181 |
| - 'async_req', |
182 |
| - '_return_http_data_only', |
183 |
| - '_preload_content', |
184 |
| - '_request_timeout', |
185 |
| - '_request_auth', |
186 |
| - '_content_type', |
187 |
| - '_headers' |
188 |
| - ] |
189 |
| - ) |
190 |
| - |
191 |
| - # validate the arguments |
192 |
| - for _key, _val in _params['kwargs'].items(): |
193 |
| - if _key not in _all_params: |
194 |
| - raise ApiTypeError( |
195 |
| - "Got an unexpected keyword argument '%s'" |
196 |
| - " to method audience_match" % _key |
197 |
| - ) |
198 |
| - _params[_key] = _val |
199 |
| - del _params['kwargs'] |
200 |
| - |
201 |
| - _collection_formats = {} |
202 |
| - |
203 |
| - # process the path parameters |
204 |
| - _path_params = {} |
205 |
| - |
206 |
| - # process the query parameters |
207 |
| - _query_params = [] |
208 |
| - # process the header parameters |
209 |
| - _header_params = dict(_params.get('_headers', {})) |
210 |
| - # process the form parameters |
211 |
| - _form_params = [] |
212 |
| - _files = {} |
213 |
| - # process the body parameter |
214 |
| - _body_params = None |
215 |
| - if _params['audience_match_messages_request'] is not None: |
216 |
| - _body_params = _params['audience_match_messages_request'] |
217 |
| - |
218 |
| - # set the HTTP header `Content-Type` |
219 |
| - _content_types_list = _params.get('_content_type', |
220 |
| - self.api_client.select_header_content_type( |
221 |
| - ['application/json'])) |
222 |
| - if _content_types_list: |
223 |
| - _header_params['Content-Type'] = _content_types_list |
224 |
| - |
225 |
| - # authentication setting |
226 |
| - _auth_settings = ['Bearer'] # noqa: E501 |
227 |
| - |
228 |
| - _response_types_map = {} |
229 |
| - |
230 |
| - return self.api_client.call_api( |
231 |
| - '/bot/ad/multicast/phone', 'POST', |
232 |
| - _path_params, |
233 |
| - _query_params, |
234 |
| - _header_params, |
235 |
| - body=_body_params, |
236 |
| - post_params=_form_params, |
237 |
| - files=_files, |
238 |
| - response_types_map=_response_types_map, |
239 |
| - auth_settings=_auth_settings, |
240 |
| - async_req=_params.get('async_req'), |
241 |
| - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 |
242 |
| - _preload_content=_params.get('_preload_content', True), |
243 |
| - _request_timeout=_params.get('_request_timeout'), |
244 |
| - _host=_host, |
245 |
| - collection_formats=_collection_formats, |
246 |
| - _request_auth=_params.get('_request_auth')) |
247 |
| - |
248 | 95 | @overload
|
249 | 96 | 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
|
250 | 97 | ...
|
|
0 commit comments