Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): add PagerDuty alert channel integrations #173

Merged
merged 1 commit into from
Jul 23, 2020

Conversation

afiune
Copy link
Contributor

@afiune afiune commented Jul 23, 2020

With this change users can now do CRUD operations of PagerDuty
Alert Channels (Integrations), here is a basic usage:

Initialize a new PagerDutyAlertChannel struct, then use the new
instance to do CRUD operations.

client, err := api.NewClient("account")
if err != nil {
  return err
}

alert := api.NewPagerDutyAlertChannel("foo",
  api.PagerDutyData{
    IntegrationKey:   "1234abc8901abc567abc123abc78e012",
    MinAlertSeverity: api.MediumAlertLevel,
  },
)

client.Integrations.CreatePagerDutyAlertChannel(alert)

Signed-off-by: Salim Afiune Maya [email protected]

@afiune afiune requested a review from scottford-lw July 23, 2020 15:43
@afiune afiune self-assigned this Jul 23, 2020
@afiune afiune added api Something related to the Go API client feat New feature or request labels Jul 23, 2020
With this change users can now do CRUD operations of PagerDuty
Alert Channels (Integrations), here is a basic usage:

Initialize a new `PagerDutyAlertChannel` struct, then use the new
instance to do CRUD operations.

```go
client, err := api.NewClient("account")
if err != nil {
  return err
}

alert := api.NewPagerDutyAlertChannel("foo",
  api.PagerDutyData{
    IntegrationKey:   "1234abc8901abc567abc123abc78e012",
    MinAlertSeverity: api.MediumAlertLevel,
  },
)

client.Integrations.CreatePagerDutyAlertChannel(alert)
```

Signed-off-by: Salim Afiune Maya <[email protected]>
@afiune afiune force-pushed the afiune/pagerduty-integration branch from a61dd61 to 99e547c Compare July 23, 2020 15:45
Copy link
Contributor

@scottford-lw scottford-lw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@afiune afiune merged commit f46316c into master Jul 23, 2020
@afiune afiune deleted the afiune/pagerduty-integration branch July 23, 2020 15:50
@afiune afiune mentioned this pull request Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Something related to the Go API client feat New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants