instance.go
author Mikael Berthe <mikael@lilotux.net>
Wed, 19 Apr 2017 09:30:47 +0200
changeset 137 acaea3179f4d
parent 130 c450bb73f59a
child 138 23d3a518d0ad
permissions -rw-r--r--
Use my own library name Move library to a new home (aka fork) instead of using my own branch of gondole, which isn't very convenient and can be confusing.

/*
Copyright 2017 Mikael Berthe

Licensed under the MIT license.  Please see the LICENSE file is this directory.
*/

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
}