Skip to content

Commit

Permalink
Fix typos and standardise PagerDuty references (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
PauloMigAlmeida authored and zorkian committed Apr 9, 2018
1 parent ebe1e4a commit 591deef
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions integrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type ServicePDRequest struct {
}

// IntegrationPDRequest defines the request payload for
// creating & updating Datadog-Pagerduty integration.
// creating & updating Datadog-PagerDuty integration.
type IntegrationPDRequest struct {
Services []ServicePDRequest `json:"services,omitempty"`
Subdomain *string `json:"subdomain,omitempty"`
Expand All @@ -40,20 +40,20 @@ type IntegrationPDRequest struct {
RunCheck *bool `json:"run_check,omitempty"`
}

// CreateIntegrationPD creates new Pagerduty Integrations.
// CreateIntegrationPD creates new PagerDuty Integrations.
// Use this if you want to setup the integration for the first time
// or to add more services/schedules.
func (client *Client) CreateIntegrationPD(pdIntegration *IntegrationPDRequest) error {
return client.doJsonRequest("POST", "/v1/integration/pagerduty", pdIntegration, nil)
}

// UpdateIntegrationPD updates the Pagerduty Integration.
// UpdateIntegrationPD updates the PagerDuty Integration.
// This will replace the existing values with the new values.
func (client *Client) UpdateIntegrationPD(pdIntegration *IntegrationPDRequest) error {
return client.doJsonRequest("PUT", "/v1/integration/pagerduty", pdIntegration, nil)
}

// GetIntegrationPD gets all the Pagerduty Integrations from the system.
// GetIntegrationPD gets all the PagerDuty Integrations from the system.
func (client *Client) GetIntegrationPD() (*integrationPD, error) {
var out integrationPD
if err := client.doJsonRequest("GET", "/v1/integration/pagerduty", nil, &out); err != nil {
Expand All @@ -63,7 +63,7 @@ func (client *Client) GetIntegrationPD() (*integrationPD, error) {
return &out, nil
}

// DeleteIntegrationPD removes the PD Integration from the system.
// DeleteIntegrationPD removes the PagerDuty Integration from the system.
func (client *Client) DeleteIntegrationPD() error {
return client.doJsonRequest("DELETE", "/v1/integration/pagerduty", nil, nil)
}
Expand Down Expand Up @@ -116,7 +116,7 @@ func (client *Client) GetIntegrationSlack() (*IntegrationSlackRequest, error) {
return &out, nil
}

// DeleteIntegrationSlack removes the PD Integration from the system.
// DeleteIntegrationSlack removes the Slack Integration from the system.
func (client *Client) DeleteIntegrationSlack() error {
return client.doJsonRequest("DELETE", "/v1/integration/slack", nil, nil)
}

0 comments on commit 591deef

Please sign in to comment.