mirror of
https://github.com/rclone/rclone.git
synced 2024-12-25 00:19:13 +01:00
21 lines
385 B
Go
21 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
|
|
}
|