All URIs are relative to https://ocis.ocis.rolling.owncloud.works/graph
Method | HTTP request | Description |
---|---|---|
GetOwnUser | Get /v1.0/me | Get current user |
UpdateOwnUser | Patch /v1.0/me | Update the current user |
User GetOwnUser(ctx).Expand(expand).Execute()
Get current user
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
expand := []string{"Expand_example"} // []string | Expand related entities (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MeUserApi.GetOwnUser(context.Background()).Expand(expand).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MeUserApi.GetOwnUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetOwnUser`: User
fmt.Fprintf(os.Stdout, "Response from `MeUserApi.GetOwnUser`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetOwnUserRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
expand | []string | Expand related entities |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User UpdateOwnUser(ctx).UserUpdate(userUpdate).Execute()
Update the current user
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
userUpdate := *openapiclient.NewUserUpdate() // UserUpdate | New user values (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MeUserApi.UpdateOwnUser(context.Background()).UserUpdate(userUpdate).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MeUserApi.UpdateOwnUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateOwnUser`: User
fmt.Fprintf(os.Stdout, "Response from `MeUserApi.UpdateOwnUser`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiUpdateOwnUserRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
userUpdate | UserUpdate | New user values |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]