mirror of
https://github.com/rclone/rclone.git
synced 2024-12-12 02:02:02 +01:00
57d5de6fba
git grep -l github.com/ncw/rclone | xargs -d'\n' perl -i~ -lpe 's|github.com/ncw/rclone|github.com/rclone/rclone|g' goimports -w `find . -name \*.go`
22 lines
397 B
Go
22 lines
397 B
Go
package koofrclient
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
httpclient "github.com/koofr/go-httpclient"
|
|
)
|
|
|
|
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
|
|
}
|