rclone/vendor/github.com/koofr/go-koofrclient/client_user.go
jaKa 1d14e30383 vendor: add github.com/koofr/go-koofrclient
* added koofr client SDK dep for koofr backend
2019-03-06 13:41:43 +00:00

20 lines
385 B
Go

package koofrclient
import (
"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
}