Skip to content

Latest commit

 

History

History
202 lines (128 loc) · 5.52 KB

UserProfileAPI.md

File metadata and controls

202 lines (128 loc) · 5.52 KB

\UserProfileAPI

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

UserProfileGetMyProfile

UserProfileVM UserProfileGetMyProfile(ctx).Execute()

Return current profile of the current user

Example

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)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiUserProfileGetMyProfileRequest struct via the builder pattern

Return type

UserProfileVM

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UserProfileGetUserProfile

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)

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
userId string

Other Parameters

Other parameters are passed through a pointer to a apiUserProfileGetUserProfileRequest struct via the builder pattern

Name Type Description Notes

Return type

UserProfileVM

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UserProfileUpdateMyProfile

UserProfileUpdateMyProfile(ctx).UpdateUserProfileVM(updateUserProfileVM).Execute()

Update profile of the current user

Example

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)
	}
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiUserProfileUpdateMyProfileRequest struct via the builder pattern

Name Type Description Notes
updateUserProfileVM UpdateUserProfileVM

Return type

(empty response body)

Authorization

ApiKey, JWT

HTTP request headers

  • 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]