instance.go
author Mikael Berthe <mikael@lilotux.net>
Sun, 16 Apr 2017 20:52:52 +0200
changeset 129 0d4544ce7e5e
parent 120 579912e9d0ef
child 130 c450bb73f59a
permissions -rw-r--r--
login: improve error message It looks like the server returns HTML when the authentication fails :/

package gondole

import (
	"github.com/sendgrid/rest"
)

// GetCurrentInstance returns current instance information
func (g *Client) GetCurrentInstance() (*Instance, error) {
	var i Instance
	if err := g.apiCall("instance", rest.Get, nil, &i); err != nil {
		return nil, err
	}
	return &i, nil
}