Skip to content

Commit

Permalink
add fields to site integrations (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-cxf committed Aug 15, 2024
1 parent 26eb827 commit 9c89950
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1109,9 +1109,10 @@ func (sc *Client) ListIntegrations(corpName, siteName string) ([]Integration, er

// IntegrationBody is the body for adding an integration.
type IntegrationBody struct {
URL string `json:"url"`
Type string `json:"type"`
Events []string `json:"events"`
URL string `json:"url"`
Type string `json:"type"`
Events []string `json:"events"`
Fields map[string]string `json:"fields,omitempty"`
}

// AddIntegration adds an integration.
Expand Down Expand Up @@ -1153,8 +1154,9 @@ func (sc *Client) GetIntegration(corpName, siteName, id string) (Integration, er

// UpdateIntegrationBody is the body for updating an integration.
type UpdateIntegrationBody struct {
URL string `json:"url,omitempty"`
Events []string `json:"events,omitempty"`
URL string `json:"url,omitempty"`
Events []string `json:"events,omitempty"`
Fields map[string]string `json:"fields,omitempty"`
}

// UpdateIntegration updates an integration by id.
Expand Down

0 comments on commit 9c89950

Please sign in to comment.