mirror of
https://bitbucket.org/myhomie/myhomie_app.git
synced 2025-12-06 00:51:19 +00:00
5.8 KiB
5.8 KiB
mycoreapi.api.UserApi
Load the API package
import 'package:mycoreapi/api.dart';
All URIs are relative to http://localhost:25049
| Method | HTTP request | Description |
|---|---|---|
| userCreateUser | POST /api/user | Create an user |
| userDeleteUser | DELETE /api/user/{id} | Delete an user |
| userGet | GET /api/user/{id} | Get a specific user |
| userGetAll | GET /api/user | Get a list of user |
| userUpdateUser | PUT /api/user | Update an user |
userCreateUser
UserInfoDetailDTO userCreateUser(userInfo)
Create an user
Example
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 | New user info |
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]
userDeleteUser
String userDeleteUser(id)
Delete an user
Example
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
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
userGet
UserInfoDetailDTO userGet(id)
Get a specific user
Example
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
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]
userGetAll
List userGetAll()
Get a list of user
Example
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
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]
userUpdateUser
UserInfoDetailDTO userUpdateUser(userInfo)
Update an user
Example
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 | User to update |
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]