mirror of
https://bitbucket.org/myhomie/mycorerepository.git
synced 2025-12-06 17:51:20 +00:00
278 lines
8.2 KiB
Markdown
278 lines
8.2 KiB
Markdown
# mycoreapi.api.AutomationApi
|
|
|
|
## Load the API package
|
|
```dart
|
|
import 'package:mycoreapi/api.dart';
|
|
```
|
|
|
|
All URIs are relative to *http://192.168.31.140*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**automationCreate**](AutomationApi.md#automationcreate) | **POST** /api/automation |
|
|
[**automationDelete**](AutomationApi.md#automationdelete) | **DELETE** /api/automation/{automationId} | Delete an automation
|
|
[**automationDeleteAllForUser**](AutomationApi.md#automationdeleteallforuser) | **DELETE** /api/automation/user/{userId} | Delete all automation for a specified
|
|
[**automationGetAll**](AutomationApi.md#automationgetall) | **GET** /api/automation/{userId} | Get all automations for the specified user
|
|
[**automationGetDetail**](AutomationApi.md#automationgetdetail) | **GET** /api/automation/detail/{automationId} | Get detail info of a specified automation
|
|
[**automationUpdate**](AutomationApi.md#automationupdate) | **PUT** /api/automation | Update an automation
|
|
|
|
|
|
# **automationCreate**
|
|
> AutomationDTO automationCreate(automationCreateOrUpdateDetailDTO)
|
|
|
|
|
|
|
|
### 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 = AutomationApi();
|
|
final automationCreateOrUpdateDetailDTO = AutomationCreateOrUpdateDetailDTO(); // AutomationCreateOrUpdateDetailDTO |
|
|
|
|
try {
|
|
final result = api_instance.automationCreate(automationCreateOrUpdateDetailDTO);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling AutomationApi->automationCreate: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**automationCreateOrUpdateDetailDTO** | [**AutomationCreateOrUpdateDetailDTO**](AutomationCreateOrUpdateDetailDTO.md)| |
|
|
|
|
### Return type
|
|
|
|
[**AutomationDTO**](AutomationDTO.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)
|
|
|
|
# **automationDelete**
|
|
> MultipartFile automationDelete(automationId)
|
|
|
|
Delete an automation
|
|
|
|
### 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 = AutomationApi();
|
|
final automationId = automationId_example; // String | Id of automation to delete
|
|
|
|
try {
|
|
final result = api_instance.automationDelete(automationId);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling AutomationApi->automationDelete: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**automationId** | **String**| Id of automation to delete |
|
|
|
|
### Return type
|
|
|
|
[**MultipartFile**](MultipartFile.md)
|
|
|
|
### Authorization
|
|
|
|
[bearer](../README.md#bearer)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/octet-stream
|
|
|
|
[[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)
|
|
|
|
# **automationDeleteAllForUser**
|
|
> MultipartFile automationDeleteAllForUser(userId)
|
|
|
|
Delete all automation for a specified
|
|
|
|
### 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 = AutomationApi();
|
|
final userId = userId_example; // String | Id of user
|
|
|
|
try {
|
|
final result = api_instance.automationDeleteAllForUser(userId);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling AutomationApi->automationDeleteAllForUser: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**userId** | **String**| Id of user |
|
|
|
|
### Return type
|
|
|
|
[**MultipartFile**](MultipartFile.md)
|
|
|
|
### Authorization
|
|
|
|
[bearer](../README.md#bearer)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/octet-stream
|
|
|
|
[[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)
|
|
|
|
# **automationGetAll**
|
|
> List<RoomSummaryDTO> automationGetAll(userId)
|
|
|
|
Get all automations for the specified 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 = AutomationApi();
|
|
final userId = userId_example; // String | Id of user
|
|
|
|
try {
|
|
final result = api_instance.automationGetAll(userId);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling AutomationApi->automationGetAll: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**userId** | **String**| Id of user |
|
|
|
|
### Return type
|
|
|
|
[**List<RoomSummaryDTO>**](RoomSummaryDTO.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)
|
|
|
|
# **automationGetDetail**
|
|
> AutomationDetailDTO automationGetDetail(automationId)
|
|
|
|
Get detail info of a specified automation
|
|
|
|
### 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 = AutomationApi();
|
|
final automationId = automationId_example; // String | automation id
|
|
|
|
try {
|
|
final result = api_instance.automationGetDetail(automationId);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling AutomationApi->automationGetDetail: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**automationId** | **String**| automation id |
|
|
|
|
### Return type
|
|
|
|
[**AutomationDetailDTO**](AutomationDetailDTO.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)
|
|
|
|
# **automationUpdate**
|
|
> AutomationCreateOrUpdateDetailDTO automationUpdate(automationCreateOrUpdateDetailDTO)
|
|
|
|
Update an automation
|
|
|
|
### 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 = AutomationApi();
|
|
final automationCreateOrUpdateDetailDTO = AutomationCreateOrUpdateDetailDTO(); // AutomationCreateOrUpdateDetailDTO | automation to update
|
|
|
|
try {
|
|
final result = api_instance.automationUpdate(automationCreateOrUpdateDetailDTO);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling AutomationApi->automationUpdate: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**automationCreateOrUpdateDetailDTO** | [**AutomationCreateOrUpdateDetailDTO**](AutomationCreateOrUpdateDetailDTO.md)| automation to update |
|
|
|
|
### Return type
|
|
|
|
[**AutomationCreateOrUpdateDetailDTO**](AutomationCreateOrUpdateDetailDTO.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)
|
|
|