2022-07-13 05:23:48 -07:00
# openapi.api.UserApi
## Load the API package
```dart
import 'package:openapi/api.dart';
```
All URIs are relative to */api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**createProfileImage** ](UserApi.md#createprofileimage ) | **POST** /user/profile-image |
[**createUser** ](UserApi.md#createuser ) | **POST** /user |
2022-11-07 14:53:47 -07:00
[**deleteUser** ](UserApi.md#deleteuser ) | **DELETE** /user/{userId} |
2022-07-13 05:23:48 -07:00
[**getAllUsers** ](UserApi.md#getallusers ) | **GET** /user |
[**getMyUserInfo** ](UserApi.md#getmyuserinfo ) | **GET** /user/me |
[**getProfileImage** ](UserApi.md#getprofileimage ) | **GET** /user/profile-image/{userId} |
2022-07-17 13:09:26 -07:00
[**getUserById** ](UserApi.md#getuserbyid ) | **GET** /user/info/{userId} |
2022-07-13 05:23:48 -07:00
[**getUserCount** ](UserApi.md#getusercount ) | **GET** /user/count |
2022-11-07 14:53:47 -07:00
[**restoreUser** ](UserApi.md#restoreuser ) | **POST** /user/{userId}/restore |
2022-07-13 05:23:48 -07:00
[**updateUser** ](UserApi.md#updateuser ) | **PUT** /user |
# **createProfileImage**
> CreateProfileImageResponseDto createProfileImage(file)
2023-01-14 22:49:47 -07:00
2022-07-13 05:23:48 -07:00
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication< HttpBearerAuth > ('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication< HttpBearerAuth > ('bearer').setAccessToken(yourTokenGeneratorFunction);
2023-02-24 09:01:10 -07:00
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication< ApiKeyAuth > ('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication< ApiKeyAuth > ('cookie').apiKeyPrefix = 'Bearer';
2022-07-13 05:23:48 -07:00
final api_instance = UserApi();
final file = BINARY_DATA_HERE; // MultipartFile |
try {
final result = api_instance.createProfileImage(file);
print(result);
} catch (e) {
print('Exception when calling UserApi->createProfileImage: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**file** | **MultipartFile** | |
### Return type
[**CreateProfileImageResponseDto** ](CreateProfileImageResponseDto.md )
### Authorization
2023-02-24 09:01:10 -07:00
[bearer ](../README.md#bearer ), [cookie ](../README.md#cookie )
2022-07-13 05:23:48 -07:00
### HTTP request headers
- **Content-Type**: multipart/form-data
- **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)
# **createUser**
> UserResponseDto createUser(createUserDto)
2023-01-14 22:49:47 -07:00
2022-07-13 05:23:48 -07:00
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication< HttpBearerAuth > ('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication< HttpBearerAuth > ('bearer').setAccessToken(yourTokenGeneratorFunction);
2023-02-24 09:01:10 -07:00
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication< ApiKeyAuth > ('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication< ApiKeyAuth > ('cookie').apiKeyPrefix = 'Bearer';
2022-07-13 05:23:48 -07:00
final api_instance = UserApi();
final createUserDto = CreateUserDto(); // CreateUserDto |
try {
final result = api_instance.createUser(createUserDto);
print(result);
} catch (e) {
print('Exception when calling UserApi->createUser: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**createUserDto** | [**CreateUserDto** ](CreateUserDto.md )| |
### Return type
[**UserResponseDto** ](UserResponseDto.md )
### Authorization
2023-02-24 09:01:10 -07:00
[bearer ](../README.md#bearer ), [cookie ](../README.md#cookie )
2022-07-13 05:23:48 -07:00
### HTTP request headers
- **Content-Type**: application/json
- **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)
2022-11-07 14:53:47 -07:00
# **deleteUser**
> UserResponseDto deleteUser(userId)
2023-01-14 22:49:47 -07:00
2022-11-07 14:53:47 -07:00
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication< HttpBearerAuth > ('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication< HttpBearerAuth > ('bearer').setAccessToken(yourTokenGeneratorFunction);
2023-02-24 09:01:10 -07:00
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication< ApiKeyAuth > ('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication< ApiKeyAuth > ('cookie').apiKeyPrefix = 'Bearer';
2022-11-07 14:53:47 -07:00
final api_instance = UserApi();
final userId = userId_example; // String |
try {
final result = api_instance.deleteUser(userId);
print(result);
} catch (e) {
print('Exception when calling UserApi->deleteUser: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String** | |
### Return type
[**UserResponseDto** ](UserResponseDto.md )
### Authorization
2023-02-24 09:01:10 -07:00
[bearer ](../README.md#bearer ), [cookie ](../README.md#cookie )
2022-11-07 14:53:47 -07:00
### 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)
2022-07-13 05:23:48 -07:00
# **getAllUsers**
> List<UserResponseDto> getAllUsers(isAll)
2023-01-14 22:49:47 -07:00
2022-07-13 05:23:48 -07:00
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication< HttpBearerAuth > ('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication< HttpBearerAuth > ('bearer').setAccessToken(yourTokenGeneratorFunction);
2023-02-24 09:01:10 -07:00
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication< ApiKeyAuth > ('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication< ApiKeyAuth > ('cookie').apiKeyPrefix = 'Bearer';
2022-07-13 05:23:48 -07:00
final api_instance = UserApi();
final isAll = true; // bool |
try {
final result = api_instance.getAllUsers(isAll);
print(result);
} catch (e) {
print('Exception when calling UserApi->getAllUsers: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**isAll** | **bool** | |
### Return type
[**List<UserResponseDto>** ](UserResponseDto.md )
### Authorization
2023-02-24 09:01:10 -07:00
[bearer ](../README.md#bearer ), [cookie ](../README.md#cookie )
2022-07-13 05:23:48 -07:00
### 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)
# **getMyUserInfo**
> UserResponseDto getMyUserInfo()
2023-01-14 22:49:47 -07:00
2022-07-13 05:23:48 -07:00
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication< HttpBearerAuth > ('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication< HttpBearerAuth > ('bearer').setAccessToken(yourTokenGeneratorFunction);
2023-02-24 09:01:10 -07:00
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication< ApiKeyAuth > ('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication< ApiKeyAuth > ('cookie').apiKeyPrefix = 'Bearer';
2022-07-13 05:23:48 -07:00
final api_instance = UserApi();
try {
final result = api_instance.getMyUserInfo();
print(result);
} catch (e) {
print('Exception when calling UserApi->getMyUserInfo: $e\n');
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**UserResponseDto** ](UserResponseDto.md )
### Authorization
2023-02-24 09:01:10 -07:00
[bearer ](../README.md#bearer ), [cookie ](../README.md#cookie )
2022-07-13 05:23:48 -07:00
### 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)
# **getProfileImage**
> Object getProfileImage(userId)
2023-01-14 22:49:47 -07:00
2022-07-13 05:23:48 -07:00
### Example
```dart
import 'package:openapi/api.dart';
final api_instance = UserApi();
final userId = userId_example; // String |
try {
final result = api_instance.getProfileImage(userId);
print(result);
} catch (e) {
print('Exception when calling UserApi->getProfileImage: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String** | |
### Return type
[**Object** ](Object.md )
### Authorization
No authorization required
### 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)
2022-07-16 21:52:00 -07:00
# **getUserById**
> UserResponseDto getUserById(userId)
2023-01-14 22:49:47 -07:00
2022-07-16 21:52:00 -07:00
### Example
```dart
import 'package:openapi/api.dart';
final api_instance = UserApi();
final userId = userId_example; // String |
try {
final result = api_instance.getUserById(userId);
print(result);
} catch (e) {
print('Exception when calling UserApi->getUserById: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String** | |
### Return type
[**UserResponseDto** ](UserResponseDto.md )
### Authorization
No authorization required
### 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)
2022-07-13 05:23:48 -07:00
# **getUserCount**
2022-12-09 13:53:11 -07:00
> UserCountResponseDto getUserCount(admin)
2022-07-13 05:23:48 -07:00
2023-01-14 22:49:47 -07:00
2022-07-13 05:23:48 -07:00
### Example
```dart
import 'package:openapi/api.dart';
final api_instance = UserApi();
2022-12-09 13:53:11 -07:00
final admin = true; // bool |
2022-07-13 05:23:48 -07:00
try {
2022-12-09 13:53:11 -07:00
final result = api_instance.getUserCount(admin);
2022-07-13 05:23:48 -07:00
print(result);
} catch (e) {
print('Exception when calling UserApi->getUserCount: $e\n');
}
```
### Parameters
2022-12-09 13:53:11 -07:00
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**admin** | **bool** | | [optional] [default to false]
2022-07-13 05:23:48 -07:00
### Return type
[**UserCountResponseDto** ](UserCountResponseDto.md )
### Authorization
No authorization required
### 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)
2022-11-07 14:53:47 -07:00
# **restoreUser**
> UserResponseDto restoreUser(userId)
2023-01-14 22:49:47 -07:00
2022-11-07 14:53:47 -07:00
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication< HttpBearerAuth > ('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication< HttpBearerAuth > ('bearer').setAccessToken(yourTokenGeneratorFunction);
2023-02-24 09:01:10 -07:00
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication< ApiKeyAuth > ('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication< ApiKeyAuth > ('cookie').apiKeyPrefix = 'Bearer';
2022-11-07 14:53:47 -07:00
final api_instance = UserApi();
final userId = userId_example; // String |
try {
final result = api_instance.restoreUser(userId);
print(result);
} catch (e) {
print('Exception when calling UserApi->restoreUser: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String** | |
### Return type
[**UserResponseDto** ](UserResponseDto.md )
### Authorization
2023-02-24 09:01:10 -07:00
[bearer ](../README.md#bearer ), [cookie ](../README.md#cookie )
2022-11-07 14:53:47 -07:00
### 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)
2022-07-13 05:23:48 -07:00
# **updateUser**
> UserResponseDto updateUser(updateUserDto)
2023-01-14 22:49:47 -07:00
2022-07-13 05:23:48 -07:00
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication< HttpBearerAuth > ('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication< HttpBearerAuth > ('bearer').setAccessToken(yourTokenGeneratorFunction);
2023-02-24 09:01:10 -07:00
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication< ApiKeyAuth > ('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication< ApiKeyAuth > ('cookie').apiKeyPrefix = 'Bearer';
2022-07-13 05:23:48 -07:00
final api_instance = UserApi();
final updateUserDto = UpdateUserDto(); // UpdateUserDto |
try {
final result = api_instance.updateUser(updateUserDto);
print(result);
} catch (e) {
print('Exception when calling UserApi->updateUser: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**updateUserDto** | [**UpdateUserDto** ](UpdateUserDto.md )| |
### Return type
[**UserResponseDto** ](UserResponseDto.md )
### Authorization
2023-02-24 09:01:10 -07:00
[bearer ](../README.md#bearer ), [cookie ](../README.md#cookie )
2022-07-13 05:23:48 -07:00
### HTTP request headers
- **Content-Type**: application/json
- **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)