add instance
parent
0206b94abc
commit
aa81cb8318
|
@ -0,0 +1,19 @@
|
||||||
|
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
|
||||||
|
}
|
Loading…
Reference in New Issue