Heroku Platform API Go Client
Go
Switch branches/tags
Nothing to show
Latest commit 84e6d01 May 16, 2017 @wchrisjohnson wchrisjohnson committed with Regenerate client based on new schema (#17)
* Regenerate client based on new schema
* Restore version
Permalink
Failed to load latest commit information.
v3 Regenerate client based on new schema (#17) May 16, 2017
LICENSE
README.md

README.md

Heroku Platform API

GoDoc

An API client interface for Heroku Platform API for the Go (golang) programming language.

Installation

To download, build, and install the package:

$ go get github.com/cyberdelia/heroku-go/v3

Example

package main

import (
	"context"
	"flag"
	"fmt"
	"log"

	"github.com/cyberdelia/heroku-go/v3"
)

var (
	username = flag.String("username", "", "api username")
	password = flag.String("password", "", "api password")
)

func main() {
	log.SetFlags(0)
	flag.Parse()

	heroku.DefaultTransport.Username = *username
	heroku.DefaultTransport.Password = *password

	h := heroku.NewService(heroku.DefaultClient)
	addons, err := h.AddOnList(context.TODO(), &heroku.ListRange{Field: "name"})
	if err != nil {
		log.Fatal(err)
	}
	for _, addon := range addons {
		fmt.Println(addon.Name)
	}
}