-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathintegrations.go
More file actions
50 lines (44 loc) · 1.65 KB
/
Copy pathintegrations.go
File metadata and controls
50 lines (44 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Code generated by internal/cmd/gen; DO NOT EDIT.
package flashduty
import "context"
// IntegrationsService handles the "On-call/Integrations" API resource.
type IntegrationsService service
// Attempt IM person linking.
//
// Try to automatically link unbound members to their IM accounts for one integration.
//
// API: POST /datasource/im/person/try-link (datasourceImPersonTryLink).
func (s *IntegrationsService) DatasourceImPersonTryLink(ctx context.Context, req *TryLinkPersonRequest) (*TryLinkPersonResponse, *Response, error) {
out := new(TryLinkPersonResponse)
resp, err := s.client.do(ctx, "/datasource/im/person/try-link", req, out)
if err != nil {
return nil, resp, err
}
return out, resp, nil
}
// Get webhook delivery detail.
//
// Retrieve the detailed payload and response for a specific webhook delivery attempt.
//
// API: POST /webhook/history/detail (webhookHistoryDetail).
func (s *IntegrationsService) Detail(ctx context.Context, req *GetWebhookHistoryDetailRequest) (*WebhookHistoryDetail, *Response, error) {
out := new(WebhookHistoryDetail)
resp, err := s.client.do(ctx, "/webhook/history/detail", req, out)
if err != nil {
return nil, resp, err
}
return out, resp, nil
}
// List webhook delivery history.
//
// List the delivery history for outbound webhook notifications.
//
// API: POST /webhook/history/list (webhookHistoryList).
func (s *IntegrationsService) List(ctx context.Context, req *ListWebhookHistoryRequest) (*ListWebhookHistoryResponse, *Response, error) {
out := new(ListWebhookHistoryResponse)
resp, err := s.client.do(ctx, "/webhook/history/list", req, out)
if err != nil {
return nil, resp, err
}
return out, resp, nil
}