instance.go
author Mikael Berthe <mikael@lilotux.net>
Fri, 28 Apr 2017 21:27:45 +0200
changeset 153 df8e8ca96e1a
parent 149 5f922977d7c7
child 155 0c581e0108da
permissions -rw-r--r--
Bump version number

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