@@ -116,73 +116,6 @@ func WithEndpoint(endpoint string) MessagingApiAPIOption {
116
116
}
117
117
}
118
118
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
-
186
119
// Broadcast
187
120
//
188
121
// Sends a message to multiple users at any time.
0 commit comments