Skip to content

Commit 9dd9c78

Browse files
github-actions[bot]github-actions
and
github-actions
authored
Retire GET /v2/bot/message/delivery/ad_phone (#535)
line/line-openapi#82 `GET /v2/bot/message/delivery/ad_phone` was sunset. This change removes it as it's no longer necessary to include it in line-openapi. Co-authored-by: github-actions <[email protected]>
1 parent c912145 commit 9dd9c78

File tree

2 files changed

+1
-72
lines changed

2 files changed

+1
-72
lines changed

line-openapi

linebot/messaging_api/api_messaging_api.go

-71
Original file line numberDiff line numberDiff line change
@@ -511,77 +511,6 @@ func (client *MessagingApiAPI) DeleteRichMenuAliasWithHttpInfo(
511511

512512
}
513513

514-
// GetAdPhoneMessageStatistics
515-
//
516-
// Get result of message delivery using phone number
517-
// Parameters:
518-
// date Date the message was sent Format: `yyyyMMdd` (e.g. `20190831`) Time Zone: UTC+9
519-
520-
// https://developers.line.biz/en/reference/partner-docs/#get-phone-audience-match
521-
func (client *MessagingApiAPI) GetAdPhoneMessageStatistics(
522-
523-
date string,
524-
525-
) (*NumberOfMessagesResponse, error) {
526-
_, body, error := client.GetAdPhoneMessageStatisticsWithHttpInfo(
527-
528-
date,
529-
)
530-
return body, error
531-
}
532-
533-
// GetAdPhoneMessageStatistics
534-
// If you want to take advantage of the HTTPResponse object for status codes and headers, use this signature.
535-
//
536-
// Get result of message delivery using phone number
537-
// Parameters:
538-
// date Date the message was sent Format: `yyyyMMdd` (e.g. `20190831`) Time Zone: UTC+9
539-
540-
// https://developers.line.biz/en/reference/partner-docs/#get-phone-audience-match
541-
func (client *MessagingApiAPI) GetAdPhoneMessageStatisticsWithHttpInfo(
542-
543-
date string,
544-
545-
) (*http.Response, *NumberOfMessagesResponse, error) {
546-
path := "/v2/bot/message/delivery/ad_phone"
547-
548-
req, err := http.NewRequest(http.MethodGet, client.Url(path), nil)
549-
if err != nil {
550-
return nil, nil, err
551-
}
552-
553-
query := url.Values{}
554-
query.Add("date", date)
555-
556-
req.URL.RawQuery = query.Encode()
557-
558-
res, err := client.Do(req)
559-
560-
if err != nil {
561-
return res, nil, err
562-
}
563-
564-
if res.StatusCode/100 != 2 {
565-
bodyBytes, err := io.ReadAll(res.Body)
566-
bodyReader := bytes.NewReader(bodyBytes)
567-
if err != nil {
568-
return res, nil, fmt.Errorf("failed to read response body: %w", err)
569-
}
570-
res.Body = io.NopCloser(bodyReader)
571-
return res, nil, fmt.Errorf("unexpected status code: %d, %s", res.StatusCode, string(bodyBytes))
572-
}
573-
574-
defer res.Body.Close()
575-
576-
decoder := json.NewDecoder(res.Body)
577-
result := NumberOfMessagesResponse{}
578-
if err := decoder.Decode(&result); err != nil {
579-
return res, nil, fmt.Errorf("failed to decode JSON: %w", err)
580-
}
581-
return res, &result, nil
582-
583-
}
584-
585514
// GetAggregationUnitNameList
586515
//
587516
// Get name list of units used this month

0 commit comments

Comments
 (0)