Skip to content
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

Remove obsolete feature: Audience Match #650

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
1,041 changes: 322 additions & 719 deletions docs/classes/LINE-Clients-MessagingApi-Api-MessagingApiApi.html

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/indices/files.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ <h3>A</h3>
<li><a href="files/src-clients-manage-audience-lib-model-audiencegrouppermission.html"><abbr title="src/clients/manage-audience/lib/Model/AudienceGroupPermission.php">AudienceGroupPermission.php</abbr></a></li>
<li><a href="files/src-clients-manage-audience-lib-model-audiencegroupstatus.html"><abbr title="src/clients/manage-audience/lib/Model/AudienceGroupStatus.php">AudienceGroupStatus.php</abbr></a></li>
<li><a href="files/src-clients-manage-audience-lib-model-audiencegrouptype.html"><abbr title="src/clients/manage-audience/lib/Model/AudienceGroupType.php">AudienceGroupType.php</abbr></a></li>
<li><a href="files/src-clients-messaging-api-lib-model-audiencematchmessagesrequest.html"><abbr title="src/clients/messaging-api/lib/Model/AudienceMatchMessagesRequest.php">AudienceMatchMessagesRequest.php</abbr></a></li>
<li><a href="files/src-clients-messaging-api-lib-model-audiencerecipient.html"><abbr title="src/clients/messaging-api/lib/Model/AudienceRecipient.php">AudienceRecipient.php</abbr></a></li>
<li><a href="files/src-clients-messaging-api-lib-model-audiomessage.html"><abbr title="src/clients/messaging-api/lib/Model/AudioMessage.php">AudioMessage.php</abbr></a></li>
<li><a href="files/src-webhook-lib-model-audiomessagecontent.html"><abbr title="src/webhook/lib/Model/AudioMessageContent.php">AudioMessageContent.php</abbr></a></li>
Expand Down
190 changes: 0 additions & 190 deletions docs/js/searchIndex.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions docs/namespaces/line-clients-messagingapi-model.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,6 @@ <h3 id="interfaces_class_traits">
<dd>AreaDemographic Class Doc Comment</dd>
<dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/LINE-Clients-MessagingApi-Model-AreaDemographicFilter.html"><abbr title="\LINE\Clients\MessagingApi\Model\AreaDemographicFilter">AreaDemographicFilter</abbr></a></dt>
<dd>AreaDemographicFilter Class Doc Comment</dd>
<dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/LINE-Clients-MessagingApi-Model-AudienceMatchMessagesRequest.html"><abbr title="\LINE\Clients\MessagingApi\Model\AudienceMatchMessagesRequest">AudienceMatchMessagesRequest</abbr></a></dt>
<dd>AudienceMatchMessagesRequest Class Doc Comment</dd>
<dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/LINE-Clients-MessagingApi-Model-AudienceRecipient.html"><abbr title="\LINE\Clients\MessagingApi\Model\AudienceRecipient">AudienceRecipient</abbr></a></dt>
<dd>AudienceRecipient Class Doc Comment</dd>
<dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/LINE-Clients-MessagingApi-Model-AudioMessage.html"><abbr title="\LINE\Clients\MessagingApi\Model\AudioMessage">AudioMessage</abbr></a></dt>
Expand Down
2 changes: 0 additions & 2 deletions docs/packages/LINE-Clients-MessagingApi.html
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,6 @@ <h3 id="interfaces_class_traits">
<dd>AreaDemographic Class Doc Comment</dd>
<dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/LINE-Clients-MessagingApi-Model-AreaDemographicFilter.html"><abbr title="\LINE\Clients\MessagingApi\Model\AreaDemographicFilter">AreaDemographicFilter</abbr></a></dt>
<dd>AreaDemographicFilter Class Doc Comment</dd>
<dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/LINE-Clients-MessagingApi-Model-AudienceMatchMessagesRequest.html"><abbr title="\LINE\Clients\MessagingApi\Model\AudienceMatchMessagesRequest">AudienceMatchMessagesRequest</abbr></a></dt>
<dd>AudienceMatchMessagesRequest Class Doc Comment</dd>
<dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/LINE-Clients-MessagingApi-Model-AudienceRecipient.html"><abbr title="\LINE\Clients\MessagingApi\Model\AudienceRecipient">AudienceRecipient</abbr></a></dt>
<dd>AudienceRecipient Class Doc Comment</dd>
<dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/LINE-Clients-MessagingApi-Model-AudioMessage.html"><abbr title="\LINE\Clients\MessagingApi\Model\AudioMessage">AudioMessage</abbr></a></dt>
Expand Down
2 changes: 1 addition & 1 deletion line-openapi
Submodule line-openapi updated 1 files
+0 −43 messaging-api.yml
215 changes: 0 additions & 215 deletions src/clients/messaging-api/lib/Api/MessagingApiApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ class MessagingApiApi

/** @var string[] $contentTypes **/
public const contentTypes = [
'audienceMatch' => [
'application/json',
],
'broadcast' => [
'application/json',
],
Expand Down Expand Up @@ -326,218 +323,6 @@ public function getConfig()
return $this->config;
}

/**
* Operation audienceMatch
*
* @param \LINE\Clients\MessagingApi\Model\AudienceMatchMessagesRequest $audienceMatchMessagesRequest audienceMatchMessagesRequest (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['audienceMatch'] to see the possible values for this operation
*
* @throws \LINE\Clients\MessagingApi\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return void
*/
public function audienceMatch($audienceMatchMessagesRequest, string $contentType = self::contentTypes['audienceMatch'][0])
{
$this->audienceMatchWithHttpInfo($audienceMatchMessagesRequest, $contentType);
}

/**
* Operation audienceMatchWithHttpInfo
*
* @param \LINE\Clients\MessagingApi\Model\AudienceMatchMessagesRequest $audienceMatchMessagesRequest (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['audienceMatch'] to see the possible values for this operation
*
* @throws \LINE\Clients\MessagingApi\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return array of null, HTTP status code, HTTP response headers (array of strings)
*/
public function audienceMatchWithHttpInfo($audienceMatchMessagesRequest, string $contentType = self::contentTypes['audienceMatch'][0])
{
$request = $this->audienceMatchRequest($audienceMatchMessagesRequest, $contentType);

try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
(int) $e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
);
} catch (ConnectException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
(int) $e->getCode(),
null,
null
);
}

$statusCode = $response->getStatusCode();


return [null, $statusCode, $response->getHeaders()];

} catch (ApiException $e) {
switch ($e->getCode()) {
}
throw $e;
}
}

/**
* Operation audienceMatchAsync
*
* @param \LINE\Clients\MessagingApi\Model\AudienceMatchMessagesRequest $audienceMatchMessagesRequest (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['audienceMatch'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function audienceMatchAsync($audienceMatchMessagesRequest, string $contentType = self::contentTypes['audienceMatch'][0])
{
return $this->audienceMatchAsyncWithHttpInfo($audienceMatchMessagesRequest, $contentType)
->then(
function ($response) {
return $response[0];
}
);
}

/**
* Operation audienceMatchAsyncWithHttpInfo
*
* @param \LINE\Clients\MessagingApi\Model\AudienceMatchMessagesRequest $audienceMatchMessagesRequest (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['audienceMatch'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function audienceMatchAsyncWithHttpInfo($audienceMatchMessagesRequest, string $contentType = self::contentTypes['audienceMatch'][0])
{
$returnType = '';
$request = $this->audienceMatchRequest($audienceMatchMessagesRequest, $contentType);

return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
return [null, $response->getStatusCode(), $response->getHeaders()];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
(string) $response->getBody()
);
}
);
}

/**
* Create request for operation 'audienceMatch'
*
* @param \LINE\Clients\MessagingApi\Model\AudienceMatchMessagesRequest $audienceMatchMessagesRequest (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['audienceMatch'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function audienceMatchRequest($audienceMatchMessagesRequest, string $contentType = self::contentTypes['audienceMatch'][0])
{

// verify the required parameter 'audienceMatchMessagesRequest' is set
if ($audienceMatchMessagesRequest === null || (is_array($audienceMatchMessagesRequest) && count($audienceMatchMessagesRequest) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $audienceMatchMessagesRequest when calling audienceMatch'
);
}


$resourcePath = '/bot/ad/multicast/phone';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;





$headers = $this->headerSelector->selectHeaders(
[],
$contentType,
$multipart
);

// for model (json/xml)
if (isset($audienceMatchMessagesRequest)) {
if (stripos($headers['Content-Type'], 'application/json') !== false) {
# if Content-Type contains "application/json", json_encode the body
$httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($audienceMatchMessagesRequest));
} else {
$httpBody = $audienceMatchMessagesRequest;
}
} elseif (count($formParams) > 0) {
if ($multipart) {
$multipartContents = [];
foreach ($formParams as $formParamName => $formParamValue) {
$formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
foreach ($formParamValueItems as $formParamValueItem) {
$multipartContents[] = [
'name' => $formParamName,
'contents' => $formParamValueItem
];
}
}
// for HTTP post (form)
$httpBody = new MultipartStream($multipartContents);

} elseif (stripos($headers['Content-Type'], 'application/json') !== false) {
# if Content-Type contains "application/json", json_encode the form parameters
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);
} else {
// for HTTP post (form)
$httpBody = ObjectSerializer::buildQuery($formParams);
}
}

// this endpoint requires Bearer authentication (access token)
if (!empty($this->config->getAccessToken())) {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}

$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}

$headers = array_merge(
$defaultHeaders,
$headerParams,
$headers
);

$operationHost = $this->config->getHost();
$query = ObjectSerializer::buildQuery($queryParams);
return new Request(
'POST',
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
}

/**
* Operation broadcast
*
Expand Down
Loading
Loading