instance.go
author Mikael Berthe <mikael@lilotux.net>
Mon, 19 Mar 2018 15:05:46 +0100
changeset 207 301d5b94be3f
parent 155 0c581e0108da
child 210 3f1f5cb7ae70
permissions -rw-r--r--
Update copyrights

/*
Copyright 2017-2018 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, nil, nil, &i); err != nil {
		return nil, err
	}
	return &i, nil
}