instance.go
author Mikael Berthe <mikael@lilotux.net>
Sat, 27 May 2017 13:18:48 +0200
changeset 186 eb9e257ba50c
parent 155 0c581e0108da
child 207 301d5b94be3f
permissions -rw-r--r--
Sync types with current Mastodon documentation

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