summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
Diffstat (limited to 'model')
-rw-r--r--model/client4.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/model/client4.go b/model/client4.go
index 420b8d510..5b7f502e1 100644
--- a/model/client4.go
+++ b/model/client4.go
@@ -1341,6 +1341,16 @@ func (c *Client4) GetOutgoingWebhooks(page int, perPage int, etag string) ([]*Ou
}
}
+// GetOutgoingWebhook outgoing webhooks on the system requested by Hook Id.
+func (c *Client4) GetOutgoingWebhook(hookId string) (*OutgoingWebhook, *Response) {
+ if r, err := c.DoApiGet(c.GetOutgoingWebhookRoute(hookId), ""); err != nil {
+ return nil, &Response{StatusCode: r.StatusCode, Error: err}
+ } else {
+ defer closeBody(r)
+ return OutgoingWebhookFromJson(r.Body), BuildResponse(r)
+ }
+}
+
// GetOutgoingWebhooksForChannel returns a page of outgoing webhooks for a channel. Page counting starts at 0.
func (c *Client4) GetOutgoingWebhooksForChannel(channelId string, page int, perPage int, etag string) ([]*OutgoingWebhook, *Response) {
query := fmt.Sprintf("?page=%v&per_page=%v&channel_id=%v", page, perPage, channelId)