10 KiB
\UsersAPI
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| CreateUserApiV1UsersPost | Post /api/v1/users/ | Create User |
| DeleteUserApiV1UsersUserIdDelete | Delete /api/v1/users/{user_id} | Delete User |
| GetCurrentUserApiV1UsersCurrentGet | Get /api/v1/users/current | Get Current User |
| ReadUserApiV1UsersUserIdGet | Get /api/v1/users/{user_id} | Read User |
| ReadUsersApiV1UsersGet | Get /api/v1/users/ | Read Users |
| UpdateUserApiV1UsersUserIdPatch | Patch /api/v1/users/{user_id} | Update User |
CreateUserApiV1UsersPost
UserResponse CreateUserApiV1UsersPost(ctx).UserCreate(userCreate).Execute()
Create User
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
userCreate := *openapiclient.NewUserCreate("Name_example", "Password_example") // UserCreate |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsersAPI.CreateUserApiV1UsersPost(context.Background()).UserCreate(userCreate).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.CreateUserApiV1UsersPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateUserApiV1UsersPost`: UserResponse
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.CreateUserApiV1UsersPost`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiCreateUserApiV1UsersPostRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| userCreate | UserCreate |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteUserApiV1UsersUserIdDelete
interface{} DeleteUserApiV1UsersUserIdDelete(ctx, userId).Execute()
Delete User
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
userId := int32(56) // int32 |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsersAPI.DeleteUserApiV1UsersUserIdDelete(context.Background(), userId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.DeleteUserApiV1UsersUserIdDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteUserApiV1UsersUserIdDelete`: interface{}
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.DeleteUserApiV1UsersUserIdDelete`: %v\n", resp)
}
Path Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| userId | int32 |
Other Parameters
Other parameters are passed through a pointer to a apiDeleteUserApiV1UsersUserIdDeleteRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
Return type
interface{}
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetCurrentUserApiV1UsersCurrentGet
UserResponse GetCurrentUserApiV1UsersCurrentGet(ctx).Execute()
Get Current User
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsersAPI.GetCurrentUserApiV1UsersCurrentGet(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.GetCurrentUserApiV1UsersCurrentGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCurrentUserApiV1UsersCurrentGet`: UserResponse
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.GetCurrentUserApiV1UsersCurrentGet`: %v\n", resp)
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiGetCurrentUserApiV1UsersCurrentGetRequest struct via the builder pattern
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ReadUserApiV1UsersUserIdGet
UserResponse ReadUserApiV1UsersUserIdGet(ctx, userId).Execute()
Read User
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
userId := int32(56) // int32 |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsersAPI.ReadUserApiV1UsersUserIdGet(context.Background(), userId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.ReadUserApiV1UsersUserIdGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ReadUserApiV1UsersUserIdGet`: UserResponse
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.ReadUserApiV1UsersUserIdGet`: %v\n", resp)
}
Path Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| userId | int32 |
Other Parameters
Other parameters are passed through a pointer to a apiReadUserApiV1UsersUserIdGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ReadUsersApiV1UsersGet
[]UserResponse ReadUsersApiV1UsersGet(ctx).Execute()
Read Users
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsersAPI.ReadUsersApiV1UsersGet(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.ReadUsersApiV1UsersGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ReadUsersApiV1UsersGet`: []UserResponse
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.ReadUsersApiV1UsersGet`: %v\n", resp)
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiReadUsersApiV1UsersGetRequest struct via the builder pattern
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateUserApiV1UsersUserIdPatch
UserResponse UpdateUserApiV1UsersUserIdPatch(ctx, userId).UserUpdate(userUpdate).Execute()
Update User
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
userId := int32(56) // int32 |
userUpdate := *openapiclient.NewUserUpdate() // UserUpdate |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsersAPI.UpdateUserApiV1UsersUserIdPatch(context.Background(), userId).UserUpdate(userUpdate).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.UpdateUserApiV1UsersUserIdPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateUserApiV1UsersUserIdPatch`: UserResponse
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.UpdateUserApiV1UsersUserIdPatch`: %v\n", resp)
}
Path Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| userId | int32 |
Other Parameters
Other parameters are passed through a pointer to a apiUpdateUserApiV1UsersUserIdPatchRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
userUpdate | UserUpdate | |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]