myhomie_app/mycore_api/doc/EventApi.md

5.9 KiB

mycoreapi.api.EventApi

Load the API package

import 'package:mycoreapi/api.dart';

All URIs are relative to http://localhost:5000

Method HTTP request Description
eventDelete DELETE /api/event/{eventId} Delete an event
eventDeleteAllForHome DELETE /api/event/home/{homeId} Delete all events for a specified home
eventGet GET /api/event/{homeId} Get events for the specified home
eventGetDetail GET /api/event/detail/{eventId} Get detail info of a specified event

eventDelete

String eventDelete(eventId)

Delete an event

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 = EventApi();
final eventId = eventId_example; // String | Id of event to delete

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

Parameters

Name Type Description Notes
eventId String Id of event 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]

eventDeleteAllForHome

String eventDeleteAllForHome(homeId)

Delete all events for a specified home

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 = EventApi();
final homeId = homeId_example; // String | Home Id

try { 
    final result = api_instance.eventDeleteAllForHome(homeId);
    print(result);
} catch (e) {
    print('Exception when calling EventApi->eventDeleteAllForHome: $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]

eventGet

ListResponseOfEventDetailDTOAndEventHomeFilter eventGet(homeId, deviceId, roomId, startIndex, count, dateStart, dateEnd, eventType, deviceType)

Get events for the specified home

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 = EventApi();
final homeId = homeId_example; // String | Home Id
final deviceId = deviceId_example; // String | 
final roomId = roomId_example; // String | 
final startIndex = 56; // int | 
final count = 56; // int | 
final dateStart = 2013-10-20T19:20:30+01:00; // DateTime | 
final dateEnd = 2013-10-20T19:20:30+01:00; // DateTime | 
final eventType = ; // OneOfEventType | 
final deviceType = ; // OneOfDeviceType | 

try { 
    final result = api_instance.eventGet(homeId, deviceId, roomId, startIndex, count, dateStart, dateEnd, eventType, deviceType);
    print(result);
} catch (e) {
    print('Exception when calling EventApi->eventGet: $e\n');
}

Parameters

Name Type Description Notes
homeId String Home Id
deviceId String [optional]
roomId String [optional]
startIndex int [optional]
count int [optional]
dateStart DateTime [optional]
dateEnd DateTime [optional]
eventType OneOfEventType [optional]
deviceType OneOfDeviceType [optional]

Return type

ListResponseOfEventDetailDTOAndEventHomeFilter

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]

eventGetDetail

EventDetailDTO eventGetDetail(eventId)

Get detail info of a specified event

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 = EventApi();
final eventId = eventId_example; // String | event id

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

Parameters

Name Type Description Notes
eventId String event id

Return type

EventDetailDTO

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]