Skip to content

Commit

Permalink
Remove obsolete feature: Audience Match (#1528)
Browse files Browse the repository at this point in the history
line/line-openapi#80

The Audience Match feature (/bot/ad/multicast/phone) was sunset in
October 2023. This change removes it as it's no longer necessary to
include it in line-openapi.

---------

Co-authored-by: github-actions <[email protected]>
Co-authored-by: Yuta Kasai <[email protected]>
  • Loading branch information
3 people authored Jan 20, 2025
1 parent 523f7ee commit 94ac94c
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 115 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ integration_test_settings.yml
# Mac
.DS_Store
bin/

# github workflow
pr_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ src/main/java/com/linecorp/bot/messaging/model/AppTypeDemographic.java
src/main/java/com/linecorp/bot/messaging/model/AppTypeDemographicFilter.java
src/main/java/com/linecorp/bot/messaging/model/AreaDemographic.java
src/main/java/com/linecorp/bot/messaging/model/AreaDemographicFilter.java
src/main/java/com/linecorp/bot/messaging/model/AudienceMatchMessagesRequest.java
src/main/java/com/linecorp/bot/messaging/model/AudienceRecipient.java
src/main/java/com/linecorp/bot/messaging/model/AudioMessage.java
src/main/java/com/linecorp/bot/messaging/model/BotInfoResponse.java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import com.linecorp.bot.client.base.ApiAuthenticatedClientBuilder;
import com.linecorp.bot.client.base.Result;
import com.linecorp.bot.client.base.channel.ChannelTokenSupplier;
import com.linecorp.bot.messaging.model.AudienceMatchMessagesRequest;
import com.linecorp.bot.messaging.model.BotInfoResponse;
import com.linecorp.bot.messaging.model.BroadcastRequest;
import com.linecorp.bot.messaging.model.CreateRichMenuAliasRequest;
Expand Down Expand Up @@ -77,17 +76,6 @@
@javax.annotation.Generated(value = "com.linecorp.bot.codegen.LineJavaCodegenGenerator")
public interface MessagingApiClient {

/**
* Send a message using phone number
*
* @param audienceMatchMessagesRequest (required)
* @see <a href="https://developers.line.biz/en/reference/partner-docs/#phone-audience-match">
* Documentation</a>
*/
@POST("/bot/ad/multicast/phone")
CompletableFuture<Result<Void>> audienceMatch(
@Body AudienceMatchMessagesRequest audienceMatchMessagesRequest);

/**
* Sends a message to multiple users at any time.
*
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import static org.assertj.core.api.Assertions.assertThat;

import com.github.tomakehurst.wiremock.WireMockServer;
import com.linecorp.bot.messaging.model.AudienceMatchMessagesRequest;
import com.linecorp.bot.messaging.model.BotInfoResponse;
import com.linecorp.bot.messaging.model.BroadcastRequest;
import com.linecorp.bot.messaging.model.CreateRichMenuAliasRequest;
Expand Down Expand Up @@ -117,32 +116,6 @@ public void tearDown() {
wireMockServer.stop();
}

@Test
public void audienceMatchTest() {
stubFor(
post(urlPathTemplate("/bot/ad/multicast/phone"))
.willReturn(
aResponse()
.withStatus(200)
.withHeader("content-type", "application/json")
.withBody("{}")));

AudienceMatchMessagesRequest audienceMatchMessagesRequest =
Arranger.some(
AudienceMatchMessagesRequest.class,
Map.of(
"message",
() -> new TextMessage("hello"),
"recipient",
() -> null,
"filter",
() -> null));

api.audienceMatch(audienceMatchMessagesRequest).join().body();

// TODO: test validations
}

@Test
public void broadcastTest() {
stubFor(
Expand Down

0 comments on commit 94ac94c

Please sign in to comment.