(ctx context.Context, req CustomNotificationRequest)
| 322 | } |
| 323 | |
| 324 | func (c *Client) PostCustomNotification(ctx context.Context, req CustomNotificationRequest) error { |
| 325 | res, err := c.Request(ctx, http.MethodPost, "/api/v2/notifications/custom", req) |
| 326 | if err != nil { |
| 327 | return err |
| 328 | } |
| 329 | defer res.Body.Close() |
| 330 | |
| 331 | if res.StatusCode != http.StatusNoContent { |
| 332 | return ReadBodyAsError(res) |
| 333 | } |
| 334 | return nil |
| 335 | } |