myhomie_app/mycore_api/doc/AutomationApi.md
2023-08-11 16:48:23 +02:00

7.9 KiB

mycore_api.api.AutomationApi

Load the API package

import 'package:mycore_api/api.dart';

All URIs are relative to https://localhost:5001

Method HTTP request Description
automationCreate POST /api/automation Create an automation
automationDelete DELETE /api/automation/{automationId} Delete an automation
automationDeleteAllForHome DELETE /api/automation/home/{homeId} Delete all automation for a specified home
automationGetAll GET /api/automation/{homeId} Get all automations for the specified home
automationGetDetail GET /api/automation/detail/{automationId} Get detail info of a specified automation
automationUpdate PUT /api/automation Update an automation

automationCreate

AutomationDTO automationCreate(automationDetailDTO)

Create an automation

Example

import 'package:mycore_api/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';

final api_instance = AutomationApi();
final automationDetailDTO = AutomationDetailDTO(); // AutomationDetailDTO | Automation to create

try {
    final result = api_instance.automationCreate(automationDetailDTO);
    print(result);
} catch (e) {
    print('Exception when calling AutomationApi->automationCreate: $e\n');
}

Parameters

Name Type Description Notes
automationDetailDTO AutomationDetailDTO Automation to create

Return type

AutomationDTO

Authorization

bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

automationDelete

String automationDelete(automationId)

Delete an automation

Example

import 'package:mycore_api/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

String

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

automationDeleteAllForHome

String automationDeleteAllForHome(homeId)

Delete all automation for a specified home

Example

import 'package:mycore_api/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';

final api_instance = AutomationApi();
final homeId = homeId_example; // String | Home Id

try {
    final result = api_instance.automationDeleteAllForHome(homeId);
    print(result);
} catch (e) {
    print('Exception when calling AutomationApi->automationDeleteAllForHome: $e\n');
}

Parameters

Name Type Description Notes
homeId String Home Id

Return type

String

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

automationGetAll

List automationGetAll(homeId)

Get all automations for the specified home

Example

import 'package:mycore_api/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';

final api_instance = AutomationApi();
final homeId = homeId_example; // String | Home Id

try {
    final result = api_instance.automationGetAll(homeId);
    print(result);
} catch (e) {
    print('Exception when calling AutomationApi->automationGetAll: $e\n');
}

Parameters

Name Type Description Notes
homeId String Home Id

Return type

List

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

automationGetDetail

AutomationDetailDTO automationGetDetail(automationId)

Get detail info of a specified automation

Example

import 'package:mycore_api/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

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

automationUpdate

AutomationDetailDTO automationUpdate(automationDetailDTO)

Update an automation

Example

import 'package:mycore_api/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';

final api_instance = AutomationApi();
final automationDetailDTO = AutomationDetailDTO(); // AutomationDetailDTO | automation to update

try {
    final result = api_instance.automationUpdate(automationDetailDTO);
    print(result);
} catch (e) {
    print('Exception when calling AutomationApi->automationUpdate: $e\n');
}

Parameters

Name Type Description Notes
automationDetailDTO AutomationDetailDTO automation to update

Return type

AutomationDetailDTO

Authorization

bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]