Fix method string to const
parent
5d72d54344
commit
cfb55e7b46
|
@ -1,5 +1,7 @@
|
||||||
package mastodon
|
package mastodon
|
||||||
|
|
||||||
|
import "net/http"
|
||||||
|
|
||||||
// Instance hold information for mastodon instance.
|
// Instance hold information for mastodon instance.
|
||||||
type Instance struct {
|
type Instance struct {
|
||||||
URI string `json:"uri"`
|
URI string `json:"uri"`
|
||||||
|
@ -11,7 +13,7 @@ type Instance struct {
|
||||||
// GetInstance return Instance.
|
// GetInstance return Instance.
|
||||||
func (c *Client) GetInstance() (*Instance, error) {
|
func (c *Client) GetInstance() (*Instance, error) {
|
||||||
var instance Instance
|
var instance Instance
|
||||||
err := c.doAPI("GET", "/api/v1/instance", nil, &instance)
|
err := c.doAPI(http.MethodGet, "/api/v1/instance", nil, &instance)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue