Skip to content

Commit a5e62df

Browse files
github-actions[bot]github-actionsYang-33
authored
Remove obsolete feature: Audience Match (#530)
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]>
1 parent bc19dc7 commit a5e62df

File tree

3 files changed

+3
-68
lines changed

3 files changed

+3
-68
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ _testmain.go
2626
.idea*
2727

2828
/.vscode/
29+
30+
# github workflow
31+
pr_info.json

linebot/messaging_api/.openapi-generator/FILES

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ model_app_type_demographic.go
99
model_app_type_demographic_filter.go
1010
model_area_demographic.go
1111
model_area_demographic_filter.go
12-
model_audience_match_messages_request.go
1312
model_audience_recipient.go
1413
model_audio_message.go
1514
model_bot_info_response.go

linebot/messaging_api/api_messaging_api.go

-67
Original file line numberDiff line numberDiff line change
@@ -116,73 +116,6 @@ func WithEndpoint(endpoint string) MessagingApiAPIOption {
116116
}
117117
}
118118

119-
// AudienceMatch
120-
//
121-
// Send a message using phone number
122-
// Parameters:
123-
// audienceMatchMessagesRequest
124-
125-
// https://developers.line.biz/en/reference/partner-docs/#phone-audience-match
126-
func (client *MessagingApiAPI) AudienceMatch(
127-
128-
audienceMatchMessagesRequest *AudienceMatchMessagesRequest,
129-
130-
) (struct{}, error) {
131-
_, body, error := client.AudienceMatchWithHttpInfo(
132-
133-
audienceMatchMessagesRequest,
134-
)
135-
return body, error
136-
}
137-
138-
// AudienceMatch
139-
// If you want to take advantage of the HTTPResponse object for status codes and headers, use this signature.
140-
//
141-
// Send a message using phone number
142-
// Parameters:
143-
// audienceMatchMessagesRequest
144-
145-
// https://developers.line.biz/en/reference/partner-docs/#phone-audience-match
146-
func (client *MessagingApiAPI) AudienceMatchWithHttpInfo(
147-
148-
audienceMatchMessagesRequest *AudienceMatchMessagesRequest,
149-
150-
) (*http.Response, struct{}, error) {
151-
path := "/bot/ad/multicast/phone"
152-
153-
var buf bytes.Buffer
154-
enc := json.NewEncoder(&buf)
155-
if err := enc.Encode(audienceMatchMessagesRequest); err != nil {
156-
return nil, struct{}{}, err
157-
}
158-
req, err := http.NewRequest(http.MethodPost, client.Url(path), &buf)
159-
if err != nil {
160-
return nil, struct{}{}, err
161-
}
162-
req.Header.Set("Content-Type", "application/json; charset=UTF-8")
163-
164-
res, err := client.Do(req)
165-
166-
if err != nil {
167-
return res, struct{}{}, err
168-
}
169-
170-
if res.StatusCode/100 != 2 {
171-
bodyBytes, err := io.ReadAll(res.Body)
172-
bodyReader := bytes.NewReader(bodyBytes)
173-
if err != nil {
174-
return res, struct{}{}, fmt.Errorf("failed to read response body: %w", err)
175-
}
176-
res.Body = io.NopCloser(bodyReader)
177-
return res, struct{}{}, fmt.Errorf("unexpected status code: %d, %s", res.StatusCode, string(bodyBytes))
178-
}
179-
180-
defer res.Body.Close()
181-
182-
return res, struct{}{}, nil
183-
184-
}
185-
186119
// Broadcast
187120
//
188121
// Sends a message to multiple users at any time.

0 commit comments

Comments
 (0)