instance.go
author Mikael Berthe <mikael@lilotux.net>
Mon, 19 Mar 2018 23:52:43 +0100
changeset 209 b9d12bab993e
parent 207 301d5b94be3f
child 210 3f1f5cb7ae70
permissions -rw-r--r--
Add Lists support

/*
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
}