rclone/vendor/github.com/koofr/go-koofrclient/client_user.go

21 lines
385 B
Go
Raw Normal View History

package koofrclient
import (
2019-08-14 13:56:32 +00:00
"github.com/koofr/go-httpclient"
"net/http"
)
func (c *KoofrClient) UserInfo() (user User, err error) {
request := httpclient.RequestData{
Method: "GET",
Path: "/api/v2/user",
ExpectedStatus: []int{http.StatusOK},
RespEncoding: httpclient.EncodingJSON,
RespValue: &user,
}
_, err = c.Request(&request)
return
}