[api] chore: update api
This commit is contained in:
@@ -4,17 +4,18 @@ All URIs are relative to *http://localhost*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**CreateUserUsersPost**](UsersAPI.md#CreateUserUsersPost) | **Post** /users/ | Create User
|
||||
[**DeleteUserUsersUserIdDelete**](UsersAPI.md#DeleteUserUsersUserIdDelete) | **Delete** /users/{user_id} | Delete User
|
||||
[**ReadUserUsersUserIdGet**](UsersAPI.md#ReadUserUsersUserIdGet) | **Get** /users/{user_id} | Read User
|
||||
[**ReadUsersUsersGet**](UsersAPI.md#ReadUsersUsersGet) | **Get** /users/ | Read Users
|
||||
[**UpdateUserUsersUserIdPatch**](UsersAPI.md#UpdateUserUsersUserIdPatch) | **Patch** /users/{user_id} | Update User
|
||||
[**CreateUserApiV1UsersPost**](UsersAPI.md#CreateUserApiV1UsersPost) | **Post** /api/v1/users/ | Create User
|
||||
[**DeleteUserApiV1UsersUserIdDelete**](UsersAPI.md#DeleteUserApiV1UsersUserIdDelete) | **Delete** /api/v1/users/{user_id} | Delete User
|
||||
[**GetCurrentUserApiV1UsersCurrentGet**](UsersAPI.md#GetCurrentUserApiV1UsersCurrentGet) | **Get** /api/v1/users/current | Get Current User
|
||||
[**ReadUserApiV1UsersUserIdGet**](UsersAPI.md#ReadUserApiV1UsersUserIdGet) | **Get** /api/v1/users/{user_id} | Read User
|
||||
[**ReadUsersApiV1UsersGet**](UsersAPI.md#ReadUsersApiV1UsersGet) | **Get** /api/v1/users/ | Read Users
|
||||
[**UpdateUserApiV1UsersUserIdPatch**](UsersAPI.md#UpdateUserApiV1UsersUserIdPatch) | **Patch** /api/v1/users/{user_id} | Update User
|
||||
|
||||
|
||||
|
||||
## CreateUserUsersPost
|
||||
## CreateUserApiV1UsersPost
|
||||
|
||||
> UserResponse CreateUserUsersPost(ctx).UserCreate(userCreate).Execute()
|
||||
> UserResponse CreateUserApiV1UsersPost(ctx).UserCreate(userCreate).Execute()
|
||||
|
||||
Create User
|
||||
|
||||
@@ -35,13 +36,13 @@ func main() {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.UsersAPI.CreateUserUsersPost(context.Background()).UserCreate(userCreate).Execute()
|
||||
resp, r, err := apiClient.UsersAPI.CreateUserApiV1UsersPost(context.Background()).UserCreate(userCreate).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.CreateUserUsersPost``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.CreateUserApiV1UsersPost``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `CreateUserUsersPost`: UserResponse
|
||||
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.CreateUserUsersPost`: %v\n", resp)
|
||||
// response from `CreateUserApiV1UsersPost`: UserResponse
|
||||
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.CreateUserApiV1UsersPost`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
@@ -51,7 +52,7 @@ func main() {
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiCreateUserUsersPostRequest struct via the builder pattern
|
||||
Other parameters are passed through a pointer to a apiCreateUserApiV1UsersPostRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
@@ -76,9 +77,9 @@ Name | Type | Description | Notes
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## DeleteUserUsersUserIdDelete
|
||||
## DeleteUserApiV1UsersUserIdDelete
|
||||
|
||||
> interface{} DeleteUserUsersUserIdDelete(ctx, userId).Execute()
|
||||
> interface{} DeleteUserApiV1UsersUserIdDelete(ctx, userId).Execute()
|
||||
|
||||
Delete User
|
||||
|
||||
@@ -99,13 +100,13 @@ func main() {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.UsersAPI.DeleteUserUsersUserIdDelete(context.Background(), userId).Execute()
|
||||
resp, r, err := apiClient.UsersAPI.DeleteUserApiV1UsersUserIdDelete(context.Background(), userId).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.DeleteUserUsersUserIdDelete``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.DeleteUserApiV1UsersUserIdDelete``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `DeleteUserUsersUserIdDelete`: interface{}
|
||||
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.DeleteUserUsersUserIdDelete`: %v\n", resp)
|
||||
// response from `DeleteUserApiV1UsersUserIdDelete`: interface{}
|
||||
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.DeleteUserApiV1UsersUserIdDelete`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
@@ -119,7 +120,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiDeleteUserUsersUserIdDeleteRequest struct via the builder pattern
|
||||
Other parameters are passed through a pointer to a apiDeleteUserApiV1UsersUserIdDeleteRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
@@ -144,9 +145,68 @@ Name | Type | Description | Notes
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## ReadUserUsersUserIdGet
|
||||
## GetCurrentUserApiV1UsersCurrentGet
|
||||
|
||||
> UserResponse ReadUserUsersUserIdGet(ctx, userId).Execute()
|
||||
> UserResponse GetCurrentUserApiV1UsersCurrentGet(ctx).Execute()
|
||||
|
||||
Get Current User
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
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
|
||||
|
||||
[**UserResponse**](UserResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## ReadUserApiV1UsersUserIdGet
|
||||
|
||||
> UserResponse ReadUserApiV1UsersUserIdGet(ctx, userId).Execute()
|
||||
|
||||
Read User
|
||||
|
||||
@@ -167,13 +227,13 @@ func main() {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.UsersAPI.ReadUserUsersUserIdGet(context.Background(), userId).Execute()
|
||||
resp, r, err := apiClient.UsersAPI.ReadUserApiV1UsersUserIdGet(context.Background(), userId).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.ReadUserUsersUserIdGet``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.ReadUserApiV1UsersUserIdGet``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `ReadUserUsersUserIdGet`: UserResponse
|
||||
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.ReadUserUsersUserIdGet`: %v\n", resp)
|
||||
// response from `ReadUserApiV1UsersUserIdGet`: UserResponse
|
||||
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.ReadUserApiV1UsersUserIdGet`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
@@ -187,7 +247,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiReadUserUsersUserIdGetRequest struct via the builder pattern
|
||||
Other parameters are passed through a pointer to a apiReadUserApiV1UsersUserIdGetRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
@@ -212,9 +272,9 @@ Name | Type | Description | Notes
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## ReadUsersUsersGet
|
||||
## ReadUsersApiV1UsersGet
|
||||
|
||||
> []UserResponse ReadUsersUsersGet(ctx).Execute()
|
||||
> []UserResponse ReadUsersApiV1UsersGet(ctx).Execute()
|
||||
|
||||
Read Users
|
||||
|
||||
@@ -234,13 +294,13 @@ func main() {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.UsersAPI.ReadUsersUsersGet(context.Background()).Execute()
|
||||
resp, r, err := apiClient.UsersAPI.ReadUsersApiV1UsersGet(context.Background()).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.ReadUsersUsersGet``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.ReadUsersApiV1UsersGet``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `ReadUsersUsersGet`: []UserResponse
|
||||
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.ReadUsersUsersGet`: %v\n", resp)
|
||||
// response from `ReadUsersApiV1UsersGet`: []UserResponse
|
||||
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.ReadUsersApiV1UsersGet`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
@@ -250,7 +310,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiReadUsersUsersGetRequest struct via the builder pattern
|
||||
Other parameters are passed through a pointer to a apiReadUsersApiV1UsersGetRequest struct via the builder pattern
|
||||
|
||||
|
||||
### Return type
|
||||
@@ -271,9 +331,9 @@ Other parameters are passed through a pointer to a apiReadUsersUsersGetRequest s
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## UpdateUserUsersUserIdPatch
|
||||
## UpdateUserApiV1UsersUserIdPatch
|
||||
|
||||
> UserResponse UpdateUserUsersUserIdPatch(ctx, userId).UserUpdate(userUpdate).Execute()
|
||||
> UserResponse UpdateUserApiV1UsersUserIdPatch(ctx, userId).UserUpdate(userUpdate).Execute()
|
||||
|
||||
Update User
|
||||
|
||||
@@ -295,13 +355,13 @@ func main() {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.UsersAPI.UpdateUserUsersUserIdPatch(context.Background(), userId).UserUpdate(userUpdate).Execute()
|
||||
resp, r, err := apiClient.UsersAPI.UpdateUserApiV1UsersUserIdPatch(context.Background(), userId).UserUpdate(userUpdate).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.UpdateUserUsersUserIdPatch``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.UpdateUserApiV1UsersUserIdPatch``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `UpdateUserUsersUserIdPatch`: UserResponse
|
||||
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.UpdateUserUsersUserIdPatch`: %v\n", resp)
|
||||
// response from `UpdateUserApiV1UsersUserIdPatch`: UserResponse
|
||||
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.UpdateUserApiV1UsersUserIdPatch`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
@@ -315,7 +375,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiUpdateUserUsersUserIdPatchRequest struct via the builder pattern
|
||||
Other parameters are passed through a pointer to a apiUpdateUserApiV1UsersUserIdPatchRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
|
||||
Reference in New Issue
Block a user