meirwah / go-pagerduty

Go API library for PagerDuty

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

go-pagerduty

Build Status

PagerDuty API client in Go.

Tested on Go versions 1.1-1.4, and tip.

Getting started

package main

import "fmt"
import "github.com/danryan/go-pagerduty/pagerduty"

func main() {
  subdomain := "PAGERDUTY_SUBDOMAIN"
  apiKey := "PAGERDUTY_API_KEY"
  pd := pagerduty.New(subdomain, apiKey)

  incident, _, err := pd.Incidents.Get("ABCDEF")

  if (err != nil) {
    fmt.Printf("error: %v\n", err)
  } else {
    fmt.Printf("incident %v: status: %v\n", incident.ID, incident.Status)
  }
}

Build/Install

go install ./...

Run tests

go test ./...

Resources

Is it any good?

Possibly.

License

This library is distributed under the MIT License, a copy of which can be found in the LICENSE file.

About

Go API library for PagerDuty

License:MIT License


Languages

Language:Go 90.4%Language:Ruby 7.3%Language:Shell 2.3%