(ctx context.Context)
| 195 | } |
| 196 | |
| 197 | func (c *Client) PostTestNotification(ctx context.Context) error { |
| 198 | res, err := c.Request(ctx, http.MethodPost, "/api/v2/notifications/test", nil) |
| 199 | if err != nil { |
| 200 | return err |
| 201 | } |
| 202 | defer res.Body.Close() |
| 203 | |
| 204 | if res.StatusCode != http.StatusNoContent { |
| 205 | return ReadBodyAsError(res) |
| 206 | } |
| 207 | return nil |
| 208 | } |
| 209 | |
| 210 | type UpdateNotificationTemplateMethod struct { |
| 211 | Method string `json:"method,omitempty" example:"webhook"` |