All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
UserProfileGetMyProfile | Get /api/manage/v1/UserProfile | Return current profile of the current user |
UserProfileGetUserProfile | Get /api/manage/v1/UserProfile/{userId} | Return user profile by user identifier. If the user did not provide information about himself or blocked, then the endpoint will return an empty model. (only id) |
UserProfileUpdateMyProfile | Put /api/manage/v1/UserProfile | Update profile of the current user |
UserProfileVM UserProfileGetMyProfile(ctx).Execute()
Return current profile of the current user
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/fastreports/gofrcloud"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserProfileAPI.UserProfileGetMyProfile(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserProfileAPI.UserProfileGetMyProfile``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UserProfileGetMyProfile`: UserProfileVM
fmt.Fprintf(os.Stdout, "Response from `UserProfileAPI.UserProfileGetMyProfile`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiUserProfileGetMyProfileRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserProfileVM UserProfileGetUserProfile(ctx, userId).Execute()
Return user profile by user identifier. If the user did not provide information about himself or blocked, then the endpoint will return an empty model. (only id)
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/fastreports/gofrcloud"
)
func main() {
userId := "userId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserProfileAPI.UserProfileGetUserProfile(context.Background(), userId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserProfileAPI.UserProfileGetUserProfile``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UserProfileGetUserProfile`: UserProfileVM
fmt.Fprintf(os.Stdout, "Response from `UserProfileAPI.UserProfileGetUserProfile`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
userId | string |
Other parameters are passed through a pointer to a apiUserProfileGetUserProfileRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserProfileUpdateMyProfile(ctx).UpdateUserProfileVM(updateUserProfileVM).Execute()
Update profile of the current user
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/fastreports/gofrcloud"
)
func main() {
updateUserProfileVM := *openapiclient.NewUpdateUserProfileVM("T_example") // UpdateUserProfileVM | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UserProfileAPI.UserProfileUpdateMyProfile(context.Background()).UpdateUserProfileVM(updateUserProfileVM).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserProfileAPI.UserProfileUpdateMyProfile``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Other parameters are passed through a pointer to a apiUserProfileUpdateMyProfileRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
updateUserProfileVM | UpdateUserProfileVM |
(empty response body)
- Content-Type: application/json, text/json, application/*+json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]