20 lines
469 B
Go
20 lines
469 B
Go
|
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
|
||
|
}
|