230 lines
5.8 KiB
Markdown

# mycoreapi.api.UserApi
## Load the API package
```dart
import 'package:mycoreapi/api.dart';
```
All URIs are relative to *http://localhost:25049*
Method | HTTP request | Description
------------- | ------------- | -------------
[**userCreateUser**](UserApi.md#usercreateuser) | **POST** /api/user | Create an user
[**userDeleteUser**](UserApi.md#userdeleteuser) | **DELETE** /api/user/{id} | Delete an user
[**userGet**](UserApi.md#userget) | **GET** /api/user/{id} | Get a specific user
[**userGetAll**](UserApi.md#usergetall) | **GET** /api/user | Get a list of user
[**userUpdateUser**](UserApi.md#userupdateuser) | **PUT** /api/user | Update an user
# **userCreateUser**
> UserInfoDetailDTO userCreateUser(userInfo)
Create an user
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = UserApi();
final userInfo = UserInfo(); // UserInfo | New user info
try {
final result = api_instance.userCreateUser(userInfo);
print(result);
} catch (e) {
print('Exception when calling UserApi->userCreateUser: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userInfo** | [**UserInfo**](UserInfo.md)| New user info |
### Return type
[**UserInfoDetailDTO**](UserInfoDetailDTO.md)
### Authorization
[bearer](../README.md#bearer)
### 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)
# **userDeleteUser**
> String userDeleteUser(id)
Delete an user
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = UserApi();
final id = id_example; // String | Id of user to delete
try {
final result = api_instance.userDeleteUser(id);
print(result);
} catch (e) {
print('Exception when calling UserApi->userDeleteUser: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| Id of user to delete |
### Return type
**String**
### Authorization
[bearer](../README.md#bearer)
### 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)
# **userGet**
> UserInfoDetailDTO userGet(id)
Get a specific user
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = UserApi();
final id = id_example; // String | id user
try {
final result = api_instance.userGet(id);
print(result);
} catch (e) {
print('Exception when calling UserApi->userGet: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| id user |
### Return type
[**UserInfoDetailDTO**](UserInfoDetailDTO.md)
### Authorization
[bearer](../README.md#bearer)
### 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)
# **userGetAll**
> List<UserInfo> userGetAll()
Get a list of user
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = UserApi();
try {
final result = api_instance.userGetAll();
print(result);
} catch (e) {
print('Exception when calling UserApi->userGetAll: $e\n');
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**List<UserInfo>**](UserInfo.md)
### Authorization
[bearer](../README.md#bearer)
### 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)
# **userUpdateUser**
> UserInfoDetailDTO userUpdateUser(userInfo)
Update an user
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = UserApi();
final userInfo = UserInfo(); // UserInfo | User to update
try {
final result = api_instance.userUpdateUser(userInfo);
print(result);
} catch (e) {
print('Exception when calling UserApi->userUpdateUser: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userInfo** | [**UserInfo**](UserInfo.md)| User to update |
### Return type
[**UserInfoDetailDTO**](UserInfoDetailDTO.md)
### Authorization
[bearer](../README.md#bearer)
### 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)