instance.go
author Mikael Berthe <mikael@lilotux.net>
Sat, 22 Apr 2017 13:08:21 +0200
changeset 144 9298c19a2b06
parent 138 23d3a518d0ad
child 149 5f922977d7c7
permissions -rw-r--r--
Update README

/*
Copyright 2017 Mikael Berthe

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

package madon

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

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