go-mastodon/instance.go

20 lines
469 B
Go
Raw Normal View History

2017-04-14 16:59:43 +02:00
package mastodon
// Instance hold information for mastodon instance.
type Instance struct {
URI string `json:"uri"`
Title string `json:"title"`
Description string `json:"description"`
EMail string `json:"email"`
}
// GetInstance return Instance.
func (c *Client) GetInstance() (*Instance, error) {
var instance Instance
err := c.doAPI("GET", "/api/v1/instance", nil, &instance)
if err != nil {
return nil, err
}
return &instance, nil
}