diff --git a/.gitignore b/.gitignore index 930d994a..2cbf6ba9 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,6 @@ _testmain.go .idea* /.vscode/ + +# github workflow +pr_info.json diff --git a/line-openapi b/line-openapi index 491e1180..5ae51b6a 160000 --- a/line-openapi +++ b/line-openapi @@ -1 +1 @@ -Subproject commit 491e11809ece8248dc079d60df40fff6096a094a +Subproject commit 5ae51b6a91aea5da364666cdc60d24919ad0b6ad diff --git a/linebot/messaging_api/.openapi-generator/FILES b/linebot/messaging_api/.openapi-generator/FILES index c822ef1f..5574c12e 100644 --- a/linebot/messaging_api/.openapi-generator/FILES +++ b/linebot/messaging_api/.openapi-generator/FILES @@ -9,7 +9,6 @@ model_app_type_demographic.go model_app_type_demographic_filter.go model_area_demographic.go model_area_demographic_filter.go -model_audience_match_messages_request.go model_audience_recipient.go model_audio_message.go model_bot_info_response.go diff --git a/linebot/messaging_api/api_messaging_api.go b/linebot/messaging_api/api_messaging_api.go index 3a1ab5a0..387fafc6 100644 --- a/linebot/messaging_api/api_messaging_api.go +++ b/linebot/messaging_api/api_messaging_api.go @@ -116,73 +116,6 @@ func WithEndpoint(endpoint string) MessagingApiAPIOption { } } -// AudienceMatch -// -// Send a message using phone number -// Parameters: -// audienceMatchMessagesRequest - -// https://developers.line.biz/en/reference/partner-docs/#phone-audience-match -func (client *MessagingApiAPI) AudienceMatch( - - audienceMatchMessagesRequest *AudienceMatchMessagesRequest, - -) (struct{}, error) { - _, body, error := client.AudienceMatchWithHttpInfo( - - audienceMatchMessagesRequest, - ) - return body, error -} - -// AudienceMatch -// If you want to take advantage of the HTTPResponse object for status codes and headers, use this signature. -// -// Send a message using phone number -// Parameters: -// audienceMatchMessagesRequest - -// https://developers.line.biz/en/reference/partner-docs/#phone-audience-match -func (client *MessagingApiAPI) AudienceMatchWithHttpInfo( - - audienceMatchMessagesRequest *AudienceMatchMessagesRequest, - -) (*http.Response, struct{}, error) { - path := "/bot/ad/multicast/phone" - - var buf bytes.Buffer - enc := json.NewEncoder(&buf) - if err := enc.Encode(audienceMatchMessagesRequest); err != nil { - return nil, struct{}{}, err - } - req, err := http.NewRequest(http.MethodPost, client.Url(path), &buf) - if err != nil { - return nil, struct{}{}, err - } - req.Header.Set("Content-Type", "application/json; charset=UTF-8") - - res, err := client.Do(req) - - if err != nil { - return res, struct{}{}, err - } - - if res.StatusCode/100 != 2 { - bodyBytes, err := io.ReadAll(res.Body) - bodyReader := bytes.NewReader(bodyBytes) - if err != nil { - return res, struct{}{}, fmt.Errorf("failed to read response body: %w", err) - } - res.Body = io.NopCloser(bodyReader) - return res, struct{}{}, fmt.Errorf("unexpected status code: %d, %s", res.StatusCode, string(bodyBytes)) - } - - defer res.Body.Close() - - return res, struct{}{}, nil - -} - // Broadcast // // Sends a message to multiple users at any time.