mirror of
https://bitbucket.org/myhomie/myhomie_app.git
synced 2025-12-06 00:51:19 +00:00
Accept http request + manifest internet + mycore api generation from openapi
This commit is contained in:
parent
d4ed804624
commit
a5bab36ee4
@ -1,7 +1,9 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="be.myhomie.myhomie_app">
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<application
|
||||
android:label="myhomie_app"
|
||||
android:usesCleartextTraffic="true"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
|
||||
3021
api/src/main/ressources/swagger.yaml
Normal file
3021
api/src/main/ressources/swagger.yaml
Normal file
File diff suppressed because it is too large
Load Diff
29
lib/client.dart
Normal file
29
lib/client.dart
Normal file
@ -0,0 +1,29 @@
|
||||
import 'package:mycoreapi/api.dart';
|
||||
//import 'package:openapi_dart_common/openapi.dart';
|
||||
|
||||
class Client {
|
||||
ApiClient _apiClient;
|
||||
ApiClient get apiApi => _apiClient;
|
||||
|
||||
TokenApi _tokenApi;
|
||||
TokenApi get tokenApi => _tokenApi;
|
||||
|
||||
AuthenticationApi _authenticationApi;
|
||||
AuthenticationApi get authenticationApi => _authenticationApi;
|
||||
|
||||
UserApi _userApi;
|
||||
UserApi get userApi => _userApi;
|
||||
|
||||
ValuesApi _valuesApi;
|
||||
ValuesApi get valuesApi => _valuesApi;
|
||||
|
||||
Client() {
|
||||
_apiClient = ApiClient(
|
||||
basePath: "http://192.168.31.140");
|
||||
//basePath: "http://localhost:25049");
|
||||
_tokenApi = TokenApi(_apiClient);
|
||||
_authenticationApi = AuthenticationApi(_apiClient);
|
||||
_userApi = UserApi(_apiClient);
|
||||
_valuesApi = ValuesApi(_apiClient);
|
||||
}
|
||||
}
|
||||
@ -1,8 +1,8 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mqtt_client/mqtt_client.dart';
|
||||
import 'package:mqtt_client/mqtt_server_client.dart';
|
||||
import 'package:mycoreapi/api.dart';
|
||||
import 'package:myhomie_app/client.dart';
|
||||
|
||||
import 'constants.dart';
|
||||
|
||||
@ -30,7 +30,7 @@ class MyApp extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _MyAppState extends State<MyApp> {
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
@ -57,7 +57,6 @@ class _MyAppState extends State<MyApp> {
|
||||
|
||||
class MyHomePage extends StatefulWidget {
|
||||
MyHomePage({Key key, this.title}) : super(key: key);
|
||||
|
||||
final String title;
|
||||
|
||||
@override
|
||||
@ -66,32 +65,46 @@ class MyHomePage extends StatefulWidget {
|
||||
|
||||
class _MyHomePageState extends State<MyHomePage> {
|
||||
int _counter = 0;
|
||||
//final MqttServerClient client = MqttServerClient.withPort('192.168.31.140', 'flutter_client00', 1883);
|
||||
final MqttServerClient client = MqttServerClient.withPort('myhomie.be', 'flutter_client00', 1883); // TODO ONLINE
|
||||
//final MqttServerClient client = MqttServerClient.withPort('192.168.31.140', 'flutter_client', 1883); // TODO Add switch button or check online connexion if local broker available
|
||||
//final MqttServerClient client = MqttServerClient.withPort('myhomie.be', 'flutter_client00', 1883); // TODO ONLINE
|
||||
final clientAPI = Client();
|
||||
|
||||
void _incrementCounter() {
|
||||
setState(() {
|
||||
_counter++;
|
||||
|
||||
print("client.connectionStatus !!! ==" + client.connectionStatus.toString());
|
||||
|
||||
/*print("client.connectionStatus !!! ==" + client.connectionStatus.toString());
|
||||
if (client.connectionStatus.state == MqttConnectionState.connected) {
|
||||
const pubTopic = 'topic/test';
|
||||
final builder = MqttClientPayloadBuilder();
|
||||
builder.addString('Hello MQTT');
|
||||
client.publishMessage(pubTopic, MqttQos.atLeastOnce, builder.payload);
|
||||
}
|
||||
}*/
|
||||
});
|
||||
}
|
||||
|
||||
void authenticateTRY() async {
|
||||
print("try auth.. ");
|
||||
LoginDTO loginDTO = new LoginDTO(email: "test", password: "test");
|
||||
LoginDTO user = await clientAPI.authenticationApi.authenticationAuthenticateWithJson(loginDTO);
|
||||
print("USER ??");
|
||||
print(user);
|
||||
// TODO Call authenticationAuthenticateWithJson to retrieve token and set apiclient bearer token with the result
|
||||
|
||||
/*var user2 = await clientAPI.userApi.userGet2("604a33639b4a377a413045b9");
|
||||
print("user2 values ??");
|
||||
print(user2.email);*/
|
||||
}
|
||||
|
||||
// connection succeeded
|
||||
void onConnected() {
|
||||
print('Connected !!!!!!!!!!!! ----------------------------------');
|
||||
|
||||
client.updates.listen((List<MqttReceivedMessage<MqttMessage>> c) {
|
||||
/*client.updates.listen((List<MqttReceivedMessage<MqttMessage>> c) {
|
||||
final MqttPublishMessage message = c[0].payload;
|
||||
final payload = MqttPublishPayload.bytesToStringAsString(message.payload.message);
|
||||
print('Received message:$payload from topic: ${c[0].topic}>');
|
||||
});
|
||||
});*/
|
||||
}
|
||||
|
||||
// unconnected
|
||||
@ -115,11 +128,11 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
}
|
||||
|
||||
Future<MqttServerClient> connect() async {
|
||||
client.logging(on: false);
|
||||
/*client.logging(on: false);
|
||||
client.keepAlivePeriod = 20;
|
||||
client.onDisconnected = onDisconnected;
|
||||
client.onConnected = onConnected;
|
||||
client.onSubscribed = onSubscribed;
|
||||
client.onSubscribed = onSubscribed;*/
|
||||
|
||||
/// Security context
|
||||
/*SecurityContext context = new SecurityContext()
|
||||
@ -139,7 +152,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
.startClean();
|
||||
//.withWillQos(MqttQos.atLeastOnce);
|
||||
//client.secure = true;
|
||||
client.connectionMessage = connMessage;
|
||||
/*client.connectionMessage = connMessage;
|
||||
client.autoReconnect = true;
|
||||
try {
|
||||
await client.connect();
|
||||
@ -149,8 +162,9 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
}
|
||||
|
||||
client.subscribe("#", MqttQos.atLeastOnce);
|
||||
|
||||
return client;
|
||||
*/
|
||||
//return client;
|
||||
return null;
|
||||
}
|
||||
|
||||
@override
|
||||
@ -175,7 +189,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
),
|
||||
),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: _incrementCounter,
|
||||
onPressed: authenticateTRY,
|
||||
tooltip: 'Increment',
|
||||
child: Icon(Icons.add),
|
||||
),
|
||||
|
||||
@ -2,6 +2,8 @@
|
||||
// Generated file. Do not edit.
|
||||
//
|
||||
|
||||
// clang-format off
|
||||
|
||||
#include "generated_plugin_registrant.h"
|
||||
|
||||
|
||||
|
||||
@ -2,6 +2,8 @@
|
||||
// Generated file. Do not edit.
|
||||
//
|
||||
|
||||
// clang-format off
|
||||
|
||||
#ifndef GENERATED_PLUGIN_REGISTRANT_
|
||||
#define GENERATED_PLUGIN_REGISTRANT_
|
||||
|
||||
|
||||
@ -2,6 +2,8 @@
|
||||
// Generated file. Do not edit.
|
||||
//
|
||||
|
||||
// clang-format off
|
||||
|
||||
import FlutterMacOS
|
||||
import Foundation
|
||||
|
||||
|
||||
27
mycore_api/.gitignore
vendored
Normal file
27
mycore_api/.gitignore
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
# See https://www.dartlang.org/tools/private-files.html
|
||||
|
||||
# Files and directories created by pub
|
||||
.buildlog
|
||||
.packages
|
||||
.project
|
||||
.pub/
|
||||
build/
|
||||
**/packages/
|
||||
|
||||
# Files created by dart2js
|
||||
# (Most Dart developers will use pub build to compile Dart, use/modify these
|
||||
# rules if you intend to use dart2js directly
|
||||
# Convention is to use extension '.dart.js' for Dart compiled to Javascript to
|
||||
# differentiate from explicit Javascript files)
|
||||
*.dart.js
|
||||
*.part.js
|
||||
*.js.deps
|
||||
*.js.map
|
||||
*.info.json
|
||||
|
||||
# Directory created by dartdoc
|
||||
doc/api/
|
||||
|
||||
# Don't commit pubspec lock file
|
||||
# (Library packages only! Remove pattern if developing an application package)
|
||||
pubspec.lock
|
||||
23
mycore_api/.openapi-generator-ignore
Normal file
23
mycore_api/.openapi-generator-ignore
Normal file
@ -0,0 +1,23 @@
|
||||
# OpenAPI Generator Ignore
|
||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
||||
237
mycore_api/.openapi-generator/FILES
Normal file
237
mycore_api/.openapi-generator/FILES
Normal file
@ -0,0 +1,237 @@
|
||||
.gitignore
|
||||
.openapi-generator-ignore
|
||||
.travis.yml
|
||||
README.md
|
||||
doc/Action.md
|
||||
doc/ActionType.md
|
||||
doc/AuthenticationApi.md
|
||||
doc/Automation.md
|
||||
doc/AutomationApi.md
|
||||
doc/AutomationCreateOrUpdateDetailDTO.md
|
||||
doc/AutomationCreateOrUpdateDetailDTOAllOf.md
|
||||
doc/AutomationDTO.md
|
||||
doc/AutomationDetailDTO.md
|
||||
doc/AutomationDetailDTOAllOf.md
|
||||
doc/AzureADAuthModel.md
|
||||
doc/AzureApi.md
|
||||
doc/Book.md
|
||||
doc/BooksApi.md
|
||||
doc/Condition.md
|
||||
doc/ConditionType.md
|
||||
doc/ConditionValue.md
|
||||
doc/ConnectionStatus.md
|
||||
doc/Device.md
|
||||
doc/DeviceApi.md
|
||||
doc/DeviceDetailDTO.md
|
||||
doc/DeviceDetailDTOAllOf.md
|
||||
doc/DeviceSummaryDTO.md
|
||||
doc/DeviceType.md
|
||||
doc/ElectricityProduction.md
|
||||
doc/EnergyApi.md
|
||||
doc/FacebookApi.md
|
||||
doc/FacebookAuthModel.md
|
||||
doc/GoogleApi.md
|
||||
doc/GoogleAuthModel.md
|
||||
doc/Group.md
|
||||
doc/GroupApi.md
|
||||
doc/GroupCreateOrUpdateDetailDTO.md
|
||||
doc/GroupCreateOrUpdateDetailDTOAllOf.md
|
||||
doc/GroupDetailDTO.md
|
||||
doc/GroupDetailDTOAllOf.md
|
||||
doc/GroupSummaryDTO.md
|
||||
doc/IOTApi.md
|
||||
doc/LayoutApi.md
|
||||
doc/LocationDTO.md
|
||||
doc/LoginDTO.md
|
||||
doc/MQTTApi.md
|
||||
doc/MeansOfCommunication.md
|
||||
doc/MqttMessageDTO.md
|
||||
doc/OddApi.md
|
||||
doc/OddH2H.md
|
||||
doc/OddNice.md
|
||||
doc/PanelMenuItem.md
|
||||
doc/PanelSection.md
|
||||
doc/Provider.md
|
||||
doc/ProviderApi.md
|
||||
doc/ProviderDTO.md
|
||||
doc/RoomApi.md
|
||||
doc/RoomCreateOrUpdateDetailDTO.md
|
||||
doc/RoomDetailDTO.md
|
||||
doc/RoomSummaryDTO.md
|
||||
doc/ScreenConfiguration.md
|
||||
doc/ScreenDevice.md
|
||||
doc/ScreenDeviceApi.md
|
||||
doc/SmartGardenMessage.md
|
||||
doc/SmartPrinterMessage.md
|
||||
doc/State.md
|
||||
doc/TokenApi.md
|
||||
doc/Trigger.md
|
||||
doc/TriggerType.md
|
||||
doc/TwitterApi.md
|
||||
doc/TwitterAuthModel.md
|
||||
doc/User.md
|
||||
doc/UserApi.md
|
||||
doc/UserInfo.md
|
||||
doc/UserInfoDetailDTO.md
|
||||
doc/ValuesApi.md
|
||||
doc/ViewBy.md
|
||||
doc/Widget.md
|
||||
git_push.sh
|
||||
lib/api.dart
|
||||
lib/api/authentication_api.dart
|
||||
lib/api/automation_api.dart
|
||||
lib/api/azure_api.dart
|
||||
lib/api/books_api.dart
|
||||
lib/api/device_api.dart
|
||||
lib/api/energy_api.dart
|
||||
lib/api/facebook_api.dart
|
||||
lib/api/google_api.dart
|
||||
lib/api/group_api.dart
|
||||
lib/api/iot_api.dart
|
||||
lib/api/layout_api.dart
|
||||
lib/api/mqtt_api.dart
|
||||
lib/api/odd_api.dart
|
||||
lib/api/provider_api.dart
|
||||
lib/api/room_api.dart
|
||||
lib/api/screen_device_api.dart
|
||||
lib/api/token_api.dart
|
||||
lib/api/twitter_api.dart
|
||||
lib/api/user_api.dart
|
||||
lib/api/values_api.dart
|
||||
lib/api_client.dart
|
||||
lib/api_exception.dart
|
||||
lib/api_helper.dart
|
||||
lib/auth/api_key_auth.dart
|
||||
lib/auth/authentication.dart
|
||||
lib/auth/http_basic_auth.dart
|
||||
lib/auth/http_bearer_auth.dart
|
||||
lib/auth/oauth.dart
|
||||
lib/model/action.dart
|
||||
lib/model/action_type.dart
|
||||
lib/model/automation.dart
|
||||
lib/model/automation_create_or_update_detail_dto.dart
|
||||
lib/model/automation_create_or_update_detail_dto_all_of.dart
|
||||
lib/model/automation_detail_dto.dart
|
||||
lib/model/automation_detail_dto_all_of.dart
|
||||
lib/model/automation_dto.dart
|
||||
lib/model/azure_ad_auth_model.dart
|
||||
lib/model/book.dart
|
||||
lib/model/condition.dart
|
||||
lib/model/condition_type.dart
|
||||
lib/model/condition_value.dart
|
||||
lib/model/connection_status.dart
|
||||
lib/model/device.dart
|
||||
lib/model/device_detail_dto.dart
|
||||
lib/model/device_detail_dto_all_of.dart
|
||||
lib/model/device_summary_dto.dart
|
||||
lib/model/device_type.dart
|
||||
lib/model/electricity_production.dart
|
||||
lib/model/facebook_auth_model.dart
|
||||
lib/model/google_auth_model.dart
|
||||
lib/model/group.dart
|
||||
lib/model/group_create_or_update_detail_dto.dart
|
||||
lib/model/group_create_or_update_detail_dto_all_of.dart
|
||||
lib/model/group_detail_dto.dart
|
||||
lib/model/group_detail_dto_all_of.dart
|
||||
lib/model/group_summary_dto.dart
|
||||
lib/model/location_dto.dart
|
||||
lib/model/login_dto.dart
|
||||
lib/model/means_of_communication.dart
|
||||
lib/model/mqtt_message_dto.dart
|
||||
lib/model/odd_h2_h.dart
|
||||
lib/model/odd_nice.dart
|
||||
lib/model/panel_menu_item.dart
|
||||
lib/model/panel_section.dart
|
||||
lib/model/provider.dart
|
||||
lib/model/provider_dto.dart
|
||||
lib/model/room_create_or_update_detail_dto.dart
|
||||
lib/model/room_detail_dto.dart
|
||||
lib/model/room_summary_dto.dart
|
||||
lib/model/screen_configuration.dart
|
||||
lib/model/screen_device.dart
|
||||
lib/model/smart_garden_message.dart
|
||||
lib/model/smart_printer_message.dart
|
||||
lib/model/state.dart
|
||||
lib/model/trigger.dart
|
||||
lib/model/trigger_type.dart
|
||||
lib/model/twitter_auth_model.dart
|
||||
lib/model/user.dart
|
||||
lib/model/user_info.dart
|
||||
lib/model/user_info_detail_dto.dart
|
||||
lib/model/view_by.dart
|
||||
lib/model/widget.dart
|
||||
pubspec.yaml
|
||||
test/action_test.dart
|
||||
test/action_type_test.dart
|
||||
test/authentication_api_test.dart
|
||||
test/automation_api_test.dart
|
||||
test/automation_create_or_update_detail_dto_all_of_test.dart
|
||||
test/automation_create_or_update_detail_dto_test.dart
|
||||
test/automation_detail_dto_all_of_test.dart
|
||||
test/automation_detail_dto_test.dart
|
||||
test/automation_dto_test.dart
|
||||
test/automation_test.dart
|
||||
test/azure_ad_auth_model_test.dart
|
||||
test/azure_api_test.dart
|
||||
test/book_test.dart
|
||||
test/books_api_test.dart
|
||||
test/condition_test.dart
|
||||
test/condition_type_test.dart
|
||||
test/condition_value_test.dart
|
||||
test/connection_status_test.dart
|
||||
test/device_api_test.dart
|
||||
test/device_detail_dto_all_of_test.dart
|
||||
test/device_detail_dto_test.dart
|
||||
test/device_summary_dto_test.dart
|
||||
test/device_test.dart
|
||||
test/device_type_test.dart
|
||||
test/electricity_production_test.dart
|
||||
test/energy_api_test.dart
|
||||
test/facebook_api_test.dart
|
||||
test/facebook_auth_model_test.dart
|
||||
test/google_api_test.dart
|
||||
test/google_auth_model_test.dart
|
||||
test/group_api_test.dart
|
||||
test/group_create_or_update_detail_dto_all_of_test.dart
|
||||
test/group_create_or_update_detail_dto_test.dart
|
||||
test/group_detail_dto_all_of_test.dart
|
||||
test/group_detail_dto_test.dart
|
||||
test/group_summary_dto_test.dart
|
||||
test/group_test.dart
|
||||
test/iot_api_test.dart
|
||||
test/layout_api_test.dart
|
||||
test/location_dto_test.dart
|
||||
test/login_dto_test.dart
|
||||
test/means_of_communication_test.dart
|
||||
test/mqtt_api_test.dart
|
||||
test/mqtt_message_dto_test.dart
|
||||
test/odd_api_test.dart
|
||||
test/odd_h2_h_test.dart
|
||||
test/odd_nice_test.dart
|
||||
test/panel_menu_item_test.dart
|
||||
test/panel_section_test.dart
|
||||
test/provider_api_test.dart
|
||||
test/provider_dto_test.dart
|
||||
test/provider_test.dart
|
||||
test/room_api_test.dart
|
||||
test/room_create_or_update_detail_dto_test.dart
|
||||
test/room_detail_dto_test.dart
|
||||
test/room_summary_dto_test.dart
|
||||
test/screen_configuration_test.dart
|
||||
test/screen_device_api_test.dart
|
||||
test/screen_device_test.dart
|
||||
test/smart_garden_message_test.dart
|
||||
test/smart_printer_message_test.dart
|
||||
test/state_test.dart
|
||||
test/token_api_test.dart
|
||||
test/trigger_test.dart
|
||||
test/trigger_type_test.dart
|
||||
test/twitter_api_test.dart
|
||||
test/twitter_auth_model_test.dart
|
||||
test/user_api_test.dart
|
||||
test/user_info_detail_dto_test.dart
|
||||
test/user_info_test.dart
|
||||
test/user_test.dart
|
||||
test/values_api_test.dart
|
||||
test/view_by_test.dart
|
||||
test/widget_test.dart
|
||||
1
mycore_api/.openapi-generator/VERSION
Normal file
1
mycore_api/.openapi-generator/VERSION
Normal file
@ -0,0 +1 @@
|
||||
5.1.0
|
||||
14
mycore_api/.travis.yml
Normal file
14
mycore_api/.travis.yml
Normal file
@ -0,0 +1,14 @@
|
||||
#
|
||||
# AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
#
|
||||
# https://docs.travis-ci.com/user/languages/dart/
|
||||
#
|
||||
language: dart
|
||||
dart:
|
||||
# Install a specific stable release
|
||||
- "2.2.0"
|
||||
install:
|
||||
- pub get
|
||||
|
||||
script:
|
||||
- pub run test
|
||||
217
mycore_api/README.md
Normal file
217
mycore_api/README.md
Normal file
@ -0,0 +1,217 @@
|
||||
# mycoreapi
|
||||
API description
|
||||
|
||||
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: Version Pre-Alpha
|
||||
- Build package: org.openapitools.codegen.languages.DartClientCodegen
|
||||
|
||||
## Requirements
|
||||
|
||||
Dart 2.0 or later
|
||||
|
||||
## Installation & Usage
|
||||
|
||||
### Github
|
||||
If this Dart package is published to Github, add the following dependency to your pubspec.yaml
|
||||
```
|
||||
dependencies:
|
||||
mycoreapi:
|
||||
git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git
|
||||
```
|
||||
|
||||
### Local
|
||||
To use the package in your local drive, add the following dependency to your pubspec.yaml
|
||||
```
|
||||
dependencies:
|
||||
mycoreapi:
|
||||
path: /path/to/mycoreapi
|
||||
```
|
||||
|
||||
## Tests
|
||||
|
||||
TODO
|
||||
|
||||
## Getting Started
|
||||
|
||||
Please follow the [installation procedure](#installation--usage) and then run the following:
|
||||
|
||||
```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 = AuthenticationApi();
|
||||
final grantType = grantType_example; // String |
|
||||
final username = username_example; // String |
|
||||
final password = password_example; // String |
|
||||
final clientId = clientId_example; // String |
|
||||
final clientSecret = clientSecret_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.authenticationAuthenticateWithForm(grantType, username, password, clientId, clientSecret);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling AuthenticationApi->authenticationAuthenticateWithForm: $e\n');
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *http://192.168.31.140*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*AuthenticationApi* | [**authenticationAuthenticateWithForm**](doc\/AuthenticationApi.md#authenticationauthenticatewithform) | **POST** /api/Authentication/Token | Authenticate with form parameters (used by Swagger test client)
|
||||
*AuthenticationApi* | [**authenticationAuthenticateWithJson**](doc\/AuthenticationApi.md#authenticationauthenticatewithjson) | **POST** /api/Authentication/Authenticate | Authenticate with Json parameters (used by most clients)
|
||||
*AutomationApi* | [**automationCreate**](doc\/AutomationApi.md#automationcreate) | **POST** /api/automation |
|
||||
*AutomationApi* | [**automationDelete**](doc\/AutomationApi.md#automationdelete) | **DELETE** /api/automation/{automationId} | Delete an automation
|
||||
*AutomationApi* | [**automationDeleteAllForUser**](doc\/AutomationApi.md#automationdeleteallforuser) | **DELETE** /api/automation/user/{userId} | Delete all automation for a specified
|
||||
*AutomationApi* | [**automationGetAll**](doc\/AutomationApi.md#automationgetall) | **GET** /api/automation/{userId} | Get all automations for the specified user
|
||||
*AutomationApi* | [**automationGetDetail**](doc\/AutomationApi.md#automationgetdetail) | **GET** /api/automation/detail/{automationId} | Get detail info of a specified automation
|
||||
*AutomationApi* | [**automationUpdate**](doc\/AutomationApi.md#automationupdate) | **PUT** /api/automation | Update an automation
|
||||
*AzureApi* | [**azureCreate**](doc\/AzureApi.md#azurecreate) | **POST** /azure |
|
||||
*BooksApi* | [**booksCreate**](doc\/BooksApi.md#bookscreate) | **POST** /api/books |
|
||||
*BooksApi* | [**booksDelete**](doc\/BooksApi.md#booksdelete) | **DELETE** /api/books/{id} |
|
||||
*BooksApi* | [**booksGet**](doc\/BooksApi.md#booksget) | **GET** /api/books/{id} |
|
||||
*BooksApi* | [**booksGetAll**](doc\/BooksApi.md#booksgetall) | **GET** /api/books |
|
||||
*BooksApi* | [**booksUpdate**](doc\/BooksApi.md#booksupdate) | **PUT** /api/books/{id} |
|
||||
*DeviceApi* | [**deviceCreate**](doc\/DeviceApi.md#devicecreate) | **POST** /api/device | Create a device
|
||||
*DeviceApi* | [**deviceCreateDevicesFromProvider**](doc\/DeviceApi.md#devicecreatedevicesfromprovider) | **POST** /api/device/{userId}/fromProvider/{providerId} | Create devices from provider
|
||||
*DeviceApi* | [**deviceDelete**](doc\/DeviceApi.md#devicedelete) | **DELETE** /api/device/{deviceId} | Delete a device
|
||||
*DeviceApi* | [**deviceDeleteAllForUser**](doc\/DeviceApi.md#devicedeleteallforuser) | **DELETE** /api/device/user/{userId} | Delete all device for a specified
|
||||
*DeviceApi* | [**deviceDeleteDevicesFromProvider**](doc\/DeviceApi.md#devicedeletedevicesfromprovider) | **DELETE** /api/device/{userId}/fromProvider/{providerId} | Delete devices from provider
|
||||
*DeviceApi* | [**deviceGetAll**](doc\/DeviceApi.md#devicegetall) | **GET** /api/device/{userId} | Get all devices summary
|
||||
*DeviceApi* | [**deviceGetDetail**](doc\/DeviceApi.md#devicegetdetail) | **GET** /api/device/detail/{deviceId} | Get a specific device info
|
||||
*DeviceApi* | [**deviceGetDevicesByType**](doc\/DeviceApi.md#devicegetdevicesbytype) | **GET** /api/device/{userId}/type/{type} | Get list of devices from a type
|
||||
*DeviceApi* | [**deviceGetDevicesFromProvider**](doc\/DeviceApi.md#devicegetdevicesfromprovider) | **GET** /api/device/{userId}/fromProvider/{providerId} | Get devices from provider
|
||||
*DeviceApi* | [**deviceGetDevicesFromZigbee2Mqtt**](doc\/DeviceApi.md#devicegetdevicesfromzigbee2mqtt) | **GET** /api/device/zigbee2Mqtt/{userId} | Get all zigbee2Mqtt devices
|
||||
*DeviceApi* | [**deviceUpdate**](doc\/DeviceApi.md#deviceupdate) | **PUT** /api/device/{deviceId} | Update a device
|
||||
*EnergyApi* | [**energyGetElectricityProduction**](doc\/EnergyApi.md#energygetelectricityproduction) | **GET** /api/energy/electricity | Get summary production of Kwh/Year
|
||||
*FacebookApi* | [**facebookCreate**](doc\/FacebookApi.md#facebookcreate) | **POST** /facebook |
|
||||
*GoogleApi* | [**googleCreate**](doc\/GoogleApi.md#googlecreate) | **POST** /google |
|
||||
*GroupApi* | [**groupCreate**](doc\/GroupApi.md#groupcreate) | **POST** /api/group | Create a group
|
||||
*GroupApi* | [**groupCreateDevicesFromZigbee2Mqtt**](doc\/GroupApi.md#groupcreatedevicesfromzigbee2mqtt) | **POST** /api/group/{userId}/fromZigbee | Create groups from provider
|
||||
*GroupApi* | [**groupDelete**](doc\/GroupApi.md#groupdelete) | **DELETE** /api/group/{groupId}/device/{deviceId} | Delete device from a group
|
||||
*GroupApi* | [**groupDelete2**](doc\/GroupApi.md#groupdelete2) | **DELETE** /api/group/{groupId} | Delete a group
|
||||
*GroupApi* | [**groupDeleteAllForUser**](doc\/GroupApi.md#groupdeleteallforuser) | **DELETE** /api/group/user/{userId} | Delete all group for a specified
|
||||
*GroupApi* | [**groupGetAll**](doc\/GroupApi.md#groupgetall) | **GET** /api/group/{userId} | Get all groups for the specified user
|
||||
*GroupApi* | [**groupGetDetail**](doc\/GroupApi.md#groupgetdetail) | **GET** /api/group/detail/{groupId} | Get detail info of a specified group
|
||||
*GroupApi* | [**groupGetGroupsByType**](doc\/GroupApi.md#groupgetgroupsbytype) | **GET** /api/group/{userId}/type/{type} | Get list of group from a type
|
||||
*GroupApi* | [**groupGetGroupsFromZigbee2Mqtt**](doc\/GroupApi.md#groupgetgroupsfromzigbee2mqtt) | **GET** /api/group/zigbee2Mqtt/{userId} | Get all zigbee2Mqtt groups
|
||||
*GroupApi* | [**groupUpdate**](doc\/GroupApi.md#groupupdate) | **PUT** /api/group | Update a group
|
||||
*IOTApi* | [**iOTGetSmartPrinterMessages**](doc\/IOTApi.md#iotgetsmartprintermessages) | **GET** /api/iot/smartprinter/{idDevice} | Retrieve all SmartPrinterMessage
|
||||
*IOTApi* | [**iOTPostToDBPrinter**](doc\/IOTApi.md#iotposttodbprinter) | **POST** /api/iot/smartprinter/{idDevice} | It's the method to post data from mqtt broker to Database (Thanks Rpi!)
|
||||
*IOTApi* | [**iOTPostToDBSmartGarden**](doc\/IOTApi.md#iotposttodbsmartgarden) | **POST** /api/iot/smartgarden/{idDevice} | It's the method to post data from mqtt broker to Database (Thanks Rpi!)
|
||||
*LayoutApi* | [**layoutGet**](doc\/LayoutApi.md#layoutget) | **GET** /api/layout/panelSection | It's a test ! :)
|
||||
*MQTTApi* | [**mQTTPublishMessage**](doc\/MQTTApi.md#mqttpublishmessage) | **POST** /api/mqtt | Publish mqtt test
|
||||
*OddApi* | [**oddGetAll**](doc\/OddApi.md#oddgetall) | **GET** /api/odd/{oddRequest} | Get odds for one country and one odd value maximum
|
||||
*OddApi* | [**oddGetForCountry**](doc\/OddApi.md#oddgetforcountry) | **GET** /api/odd/country/{id}/{oddRequest} | Get odds for one country and one odd value maximum
|
||||
*ProviderApi* | [**providerCreate**](doc\/ProviderApi.md#providercreate) | **POST** /api/provider | Create a provider
|
||||
*ProviderApi* | [**providerDelete**](doc\/ProviderApi.md#providerdelete) | **DELETE** /api/provider/{providerId} | Delete a provider
|
||||
*ProviderApi* | [**providerGetAll**](doc\/ProviderApi.md#providergetall) | **GET** /api/provider/{userId} | Get all user providers
|
||||
*ProviderApi* | [**providerUpdate**](doc\/ProviderApi.md#providerupdate) | **PUT** /api/provider | Update a provider
|
||||
*RoomApi* | [**roomCreate**](doc\/RoomApi.md#roomcreate) | **POST** /api/room | Create a room
|
||||
*RoomApi* | [**roomDelete**](doc\/RoomApi.md#roomdelete) | **DELETE** /api/room/{roomId}/device/{deviceId} | Delete device from a room
|
||||
*RoomApi* | [**roomDelete2**](doc\/RoomApi.md#roomdelete2) | **DELETE** /api/room/{roomId} | Delete a room
|
||||
*RoomApi* | [**roomDeleteAllForUser**](doc\/RoomApi.md#roomdeleteallforuser) | **DELETE** /api/room/user/{userId} | Delete all room for a specified
|
||||
*RoomApi* | [**roomGetAll**](doc\/RoomApi.md#roomgetall) | **GET** /api/room/{userId} | Get all rooms for the specified user
|
||||
*RoomApi* | [**roomGetDetail**](doc\/RoomApi.md#roomgetdetail) | **GET** /api/room/detail/{roomId} | Get detail info of a specified room
|
||||
*RoomApi* | [**roomUpdate**](doc\/RoomApi.md#roomupdate) | **PUT** /api/room | Update a room
|
||||
*ScreenDeviceApi* | [**screenDeviceCreateDevice**](doc\/ScreenDeviceApi.md#screendevicecreatedevice) | **POST** /api/device/screen |
|
||||
*ScreenDeviceApi* | [**screenDeviceDeleteDevice**](doc\/ScreenDeviceApi.md#screendevicedeletedevice) | **DELETE** /api/device/screen/{deviceId} |
|
||||
*ScreenDeviceApi* | [**screenDeviceGetAllScreenDevices**](doc\/ScreenDeviceApi.md#screendevicegetallscreendevices) | **GET** /api/device/screen |
|
||||
*ScreenDeviceApi* | [**screenDeviceGetDeviceInfo**](doc\/ScreenDeviceApi.md#screendevicegetdeviceinfo) | **GET** /api/device/screen/{screenDeviceId} |
|
||||
*ScreenDeviceApi* | [**screenDeviceUpdateDevice**](doc\/ScreenDeviceApi.md#screendeviceupdatedevice) | **PUT** /api/device/screen/{screenDeviceId} |
|
||||
*TokenApi* | [**tokenConnectUser**](doc\/TokenApi.md#tokenconnectuser) | **POST** /api/token |
|
||||
*TokenApi* | [**tokenCreate**](doc\/TokenApi.md#tokencreate) | **POST** /token |
|
||||
*TwitterApi* | [**twitterCreate**](doc\/TwitterApi.md#twittercreate) | **POST** /twitter |
|
||||
*UserApi* | [**userCreateUser**](doc\/UserApi.md#usercreateuser) | **POST** /api/user |
|
||||
*UserApi* | [**userDeleteUser**](doc\/UserApi.md#userdeleteuser) | **DELETE** /api/user/{id} |
|
||||
*UserApi* | [**userGet**](doc\/UserApi.md#userget) | **GET** /api/user | Get a list of user
|
||||
*UserApi* | [**userGet2**](doc\/UserApi.md#userget2) | **GET** /api/user/{id} | Get a specific user
|
||||
*UserApi* | [**userUpdateUser**](doc\/UserApi.md#userupdateuser) | **PUT** /api/user |
|
||||
*ValuesApi* | [**valuesDelete**](doc\/ValuesApi.md#valuesdelete) | **DELETE** /api/test/{id} |
|
||||
*ValuesApi* | [**valuesGet**](doc\/ValuesApi.md#valuesget) | **GET** /api/test/{id} |
|
||||
*ValuesApi* | [**valuesGetAll**](doc\/ValuesApi.md#valuesgetall) | **GET** /api/test | It's a test ! :)
|
||||
*ValuesApi* | [**valuesPost**](doc\/ValuesApi.md#valuespost) | **POST** /api/test |
|
||||
*ValuesApi* | [**valuesPut**](doc\/ValuesApi.md#valuesput) | **PUT** /api/test/{id} |
|
||||
|
||||
|
||||
## Documentation For Models
|
||||
|
||||
- [Action](doc\/Action.md)
|
||||
- [ActionType](doc\/ActionType.md)
|
||||
- [Automation](doc\/Automation.md)
|
||||
- [AutomationCreateOrUpdateDetailDTO](doc\/AutomationCreateOrUpdateDetailDTO.md)
|
||||
- [AutomationCreateOrUpdateDetailDTOAllOf](doc\/AutomationCreateOrUpdateDetailDTOAllOf.md)
|
||||
- [AutomationDTO](doc\/AutomationDTO.md)
|
||||
- [AutomationDetailDTO](doc\/AutomationDetailDTO.md)
|
||||
- [AutomationDetailDTOAllOf](doc\/AutomationDetailDTOAllOf.md)
|
||||
- [AzureADAuthModel](doc\/AzureADAuthModel.md)
|
||||
- [Book](doc\/Book.md)
|
||||
- [Condition](doc\/Condition.md)
|
||||
- [ConditionType](doc\/ConditionType.md)
|
||||
- [ConditionValue](doc\/ConditionValue.md)
|
||||
- [ConnectionStatus](doc\/ConnectionStatus.md)
|
||||
- [Device](doc\/Device.md)
|
||||
- [DeviceDetailDTO](doc\/DeviceDetailDTO.md)
|
||||
- [DeviceDetailDTOAllOf](doc\/DeviceDetailDTOAllOf.md)
|
||||
- [DeviceSummaryDTO](doc\/DeviceSummaryDTO.md)
|
||||
- [DeviceType](doc\/DeviceType.md)
|
||||
- [ElectricityProduction](doc\/ElectricityProduction.md)
|
||||
- [FacebookAuthModel](doc\/FacebookAuthModel.md)
|
||||
- [GoogleAuthModel](doc\/GoogleAuthModel.md)
|
||||
- [Group](doc\/Group.md)
|
||||
- [GroupCreateOrUpdateDetailDTO](doc\/GroupCreateOrUpdateDetailDTO.md)
|
||||
- [GroupCreateOrUpdateDetailDTOAllOf](doc\/GroupCreateOrUpdateDetailDTOAllOf.md)
|
||||
- [GroupDetailDTO](doc\/GroupDetailDTO.md)
|
||||
- [GroupDetailDTOAllOf](doc\/GroupDetailDTOAllOf.md)
|
||||
- [GroupSummaryDTO](doc\/GroupSummaryDTO.md)
|
||||
- [LocationDTO](doc\/LocationDTO.md)
|
||||
- [LoginDTO](doc\/LoginDTO.md)
|
||||
- [MeansOfCommunication](doc\/MeansOfCommunication.md)
|
||||
- [MqttMessageDTO](doc\/MqttMessageDTO.md)
|
||||
- [OddH2H](doc\/OddH2H.md)
|
||||
- [OddNice](doc\/OddNice.md)
|
||||
- [PanelMenuItem](doc\/PanelMenuItem.md)
|
||||
- [PanelSection](doc\/PanelSection.md)
|
||||
- [Provider](doc\/Provider.md)
|
||||
- [ProviderDTO](doc\/ProviderDTO.md)
|
||||
- [RoomCreateOrUpdateDetailDTO](doc\/RoomCreateOrUpdateDetailDTO.md)
|
||||
- [RoomDetailDTO](doc\/RoomDetailDTO.md)
|
||||
- [RoomSummaryDTO](doc\/RoomSummaryDTO.md)
|
||||
- [ScreenConfiguration](doc\/ScreenConfiguration.md)
|
||||
- [ScreenDevice](doc\/ScreenDevice.md)
|
||||
- [SmartGardenMessage](doc\/SmartGardenMessage.md)
|
||||
- [SmartPrinterMessage](doc\/SmartPrinterMessage.md)
|
||||
- [State](doc\/State.md)
|
||||
- [Trigger](doc\/Trigger.md)
|
||||
- [TriggerType](doc\/TriggerType.md)
|
||||
- [TwitterAuthModel](doc\/TwitterAuthModel.md)
|
||||
- [User](doc\/User.md)
|
||||
- [UserInfo](doc\/UserInfo.md)
|
||||
- [UserInfoDetailDTO](doc\/UserInfoDetailDTO.md)
|
||||
- [ViewBy](doc\/ViewBy.md)
|
||||
- [Widget](doc\/Widget.md)
|
||||
|
||||
|
||||
## Documentation For Authorization
|
||||
|
||||
|
||||
## bearer
|
||||
|
||||
- **Type**: OAuth
|
||||
- **Flow**: password
|
||||
- **Authorization URL**: /authentication/Token
|
||||
- **Scopes**:
|
||||
- **MyCore-api**: MyCore WebAPI
|
||||
|
||||
|
||||
## Author
|
||||
|
||||
|
||||
|
||||
|
||||
20
mycore_api/doc/Action.md
Normal file
20
mycore_api/doc/Action.md
Normal file
@ -0,0 +1,20 @@
|
||||
# mycoreapi.model.Action
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**groupId** | **String** | | [optional]
|
||||
**deviceId** | **String** | | [optional]
|
||||
**states** | [**List<State>**](State.md) | | [optional] [default to const []]
|
||||
**rawRequest** | **String** | | [optional]
|
||||
**providerId** | **String** | | [optional]
|
||||
**type** | [**ActionType**](ActionType.md) | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
14
mycore_api/doc/ActionType.md
Normal file
14
mycore_api/doc/ActionType.md
Normal file
@ -0,0 +1,14 @@
|
||||
# mycoreapi.model.ActionType
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
109
mycore_api/doc/AuthenticationApi.md
Normal file
109
mycore_api/doc/AuthenticationApi.md
Normal file
@ -0,0 +1,109 @@
|
||||
# mycoreapi.api.AuthenticationApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://192.168.31.140*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**authenticationAuthenticateWithForm**](AuthenticationApi.md#authenticationauthenticatewithform) | **POST** /api/Authentication/Token | Authenticate with form parameters (used by Swagger test client)
|
||||
[**authenticationAuthenticateWithJson**](AuthenticationApi.md#authenticationauthenticatewithjson) | **POST** /api/Authentication/Authenticate | Authenticate with Json parameters (used by most clients)
|
||||
|
||||
|
||||
# **authenticationAuthenticateWithForm**
|
||||
> LoginDTO authenticationAuthenticateWithForm(grantType, username, password, clientId, clientSecret)
|
||||
|
||||
Authenticate with form parameters (used by Swagger test client)
|
||||
|
||||
### 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 = AuthenticationApi();
|
||||
final grantType = grantType_example; // String |
|
||||
final username = username_example; // String |
|
||||
final password = password_example; // String |
|
||||
final clientId = clientId_example; // String |
|
||||
final clientSecret = clientSecret_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.authenticationAuthenticateWithForm(grantType, username, password, clientId, clientSecret);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling AuthenticationApi->authenticationAuthenticateWithForm: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**grantType** | **String**| | [optional]
|
||||
**username** | **String**| | [optional]
|
||||
**password** | **String**| | [optional]
|
||||
**clientId** | **String**| | [optional]
|
||||
**clientSecret** | **String**| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**LoginDTO**](LoginDTO.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[bearer](../README.md#bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **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)
|
||||
|
||||
# **authenticationAuthenticateWithJson**
|
||||
> LoginDTO authenticationAuthenticateWithJson(loginDTO)
|
||||
|
||||
Authenticate with Json parameters (used by most clients)
|
||||
|
||||
### 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 = AuthenticationApi();
|
||||
final loginDTO = LoginDTO(); // LoginDTO | Login DTO
|
||||
|
||||
try {
|
||||
final result = api_instance.authenticationAuthenticateWithJson(loginDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling AuthenticationApi->authenticationAuthenticateWithJson: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**loginDTO** | [**LoginDTO**](LoginDTO.md)| Login DTO |
|
||||
|
||||
### Return type
|
||||
|
||||
[**LoginDTO**](LoginDTO.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)
|
||||
|
||||
23
mycore_api/doc/Automation.md
Normal file
23
mycore_api/doc/Automation.md
Normal file
@ -0,0 +1,23 @@
|
||||
# mycoreapi.model.Automation
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**userId** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**createdDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**updatedDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**triggers** | [**List<Trigger>**](Trigger.md) | | [optional] [default to const []]
|
||||
**conditions** | [**List<Condition>**](Condition.md) | | [optional] [default to const []]
|
||||
**actions** | [**List<Action>**](Action.md) | | [optional] [default to const []]
|
||||
**devicesIds** | **List<String>** | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
277
mycore_api/doc/AutomationApi.md
Normal file
277
mycore_api/doc/AutomationApi.md
Normal file
@ -0,0 +1,277 @@
|
||||
# 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)
|
||||
|
||||
23
mycore_api/doc/AutomationCreateOrUpdateDetailDTO.md
Normal file
23
mycore_api/doc/AutomationCreateOrUpdateDetailDTO.md
Normal file
@ -0,0 +1,23 @@
|
||||
# mycoreapi.model.AutomationCreateOrUpdateDetailDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**userId** | **String** | | [optional]
|
||||
**createdDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**updatedDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**triggers** | [**List<Trigger>**](Trigger.md) | | [optional] [default to const []]
|
||||
**conditions** | [**List<Condition>**](Condition.md) | | [optional] [default to const []]
|
||||
**actions** | [**List<Action>**](Action.md) | | [optional] [default to const []]
|
||||
**deviceIds** | **List<String>** | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
18
mycore_api/doc/AutomationCreateOrUpdateDetailDTOAllOf.md
Normal file
18
mycore_api/doc/AutomationCreateOrUpdateDetailDTOAllOf.md
Normal file
@ -0,0 +1,18 @@
|
||||
# mycoreapi.model.AutomationCreateOrUpdateDetailDTOAllOf
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**triggers** | [**List<Trigger>**](Trigger.md) | | [optional] [default to const []]
|
||||
**conditions** | [**List<Condition>**](Condition.md) | | [optional] [default to const []]
|
||||
**actions** | [**List<Action>**](Action.md) | | [optional] [default to const []]
|
||||
**deviceIds** | **List<String>** | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
19
mycore_api/doc/AutomationDTO.md
Normal file
19
mycore_api/doc/AutomationDTO.md
Normal file
@ -0,0 +1,19 @@
|
||||
# mycoreapi.model.AutomationDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**userId** | **String** | | [optional]
|
||||
**createdDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**updatedDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
23
mycore_api/doc/AutomationDetailDTO.md
Normal file
23
mycore_api/doc/AutomationDetailDTO.md
Normal file
@ -0,0 +1,23 @@
|
||||
# mycoreapi.model.AutomationDetailDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**userId** | **String** | | [optional]
|
||||
**createdDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**updatedDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**triggers** | [**List<Trigger>**](Trigger.md) | | [optional] [default to const []]
|
||||
**conditions** | [**List<Condition>**](Condition.md) | | [optional] [default to const []]
|
||||
**actions** | [**List<Action>**](Action.md) | | [optional] [default to const []]
|
||||
**devicesIds** | **List<String>** | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
18
mycore_api/doc/AutomationDetailDTOAllOf.md
Normal file
18
mycore_api/doc/AutomationDetailDTOAllOf.md
Normal file
@ -0,0 +1,18 @@
|
||||
# mycoreapi.model.AutomationDetailDTOAllOf
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**triggers** | [**List<Trigger>**](Trigger.md) | | [optional] [default to const []]
|
||||
**conditions** | [**List<Condition>**](Condition.md) | | [optional] [default to const []]
|
||||
**actions** | [**List<Action>**](Action.md) | | [optional] [default to const []]
|
||||
**devicesIds** | **List<String>** | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
15
mycore_api/doc/AzureADAuthModel.md
Normal file
15
mycore_api/doc/AzureADAuthModel.md
Normal file
@ -0,0 +1,15 @@
|
||||
# mycoreapi.model.AzureADAuthModel
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**apiKey** | **String** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
57
mycore_api/doc/AzureApi.md
Normal file
57
mycore_api/doc/AzureApi.md
Normal file
@ -0,0 +1,57 @@
|
||||
# mycoreapi.api.AzureApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://192.168.31.140*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**azureCreate**](AzureApi.md#azurecreate) | **POST** /azure |
|
||||
|
||||
|
||||
# **azureCreate**
|
||||
> MultipartFile azureCreate(azureADAuthModel)
|
||||
|
||||
|
||||
|
||||
### 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 = AzureApi();
|
||||
final azureADAuthModel = AzureADAuthModel(); // AzureADAuthModel |
|
||||
|
||||
try {
|
||||
final result = api_instance.azureCreate(azureADAuthModel);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling AzureApi->azureCreate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**azureADAuthModel** | [**AzureADAuthModel**](AzureADAuthModel.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**MultipartFile**](MultipartFile.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[bearer](../README.md#bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **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)
|
||||
|
||||
19
mycore_api/doc/Book.md
Normal file
19
mycore_api/doc/Book.md
Normal file
@ -0,0 +1,19 @@
|
||||
# mycoreapi.model.Book
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**bookName** | **String** | | [optional]
|
||||
**price** | **num** | | [optional]
|
||||
**category** | **String** | | [optional]
|
||||
**author** | **String** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
231
mycore_api/doc/BooksApi.md
Normal file
231
mycore_api/doc/BooksApi.md
Normal file
@ -0,0 +1,231 @@
|
||||
# mycoreapi.api.BooksApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://192.168.31.140*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**booksCreate**](BooksApi.md#bookscreate) | **POST** /api/books |
|
||||
[**booksDelete**](BooksApi.md#booksdelete) | **DELETE** /api/books/{id} |
|
||||
[**booksGet**](BooksApi.md#booksget) | **GET** /api/books/{id} |
|
||||
[**booksGetAll**](BooksApi.md#booksgetall) | **GET** /api/books |
|
||||
[**booksUpdate**](BooksApi.md#booksupdate) | **PUT** /api/books/{id} |
|
||||
|
||||
|
||||
# **booksCreate**
|
||||
> Book booksCreate(book)
|
||||
|
||||
|
||||
|
||||
### 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 = BooksApi();
|
||||
final book = Book(); // Book |
|
||||
|
||||
try {
|
||||
final result = api_instance.booksCreate(book);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling BooksApi->booksCreate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**book** | [**Book**](Book.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Book**](Book.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)
|
||||
|
||||
# **booksDelete**
|
||||
> MultipartFile booksDelete(id)
|
||||
|
||||
|
||||
|
||||
### 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 = BooksApi();
|
||||
final id = id_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.booksDelete(id);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling BooksApi->booksDelete: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **String**| |
|
||||
|
||||
### 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)
|
||||
|
||||
# **booksGet**
|
||||
> Book booksGet(id)
|
||||
|
||||
|
||||
|
||||
### 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 = BooksApi();
|
||||
final id = id_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.booksGet(id);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling BooksApi->booksGet: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **String**| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Book**](Book.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)
|
||||
|
||||
# **booksGetAll**
|
||||
> List<Book> booksGetAll()
|
||||
|
||||
|
||||
|
||||
### 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 = BooksApi();
|
||||
|
||||
try {
|
||||
final result = api_instance.booksGetAll();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling BooksApi->booksGetAll: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Book>**](Book.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)
|
||||
|
||||
# **booksUpdate**
|
||||
> MultipartFile booksUpdate(id, book)
|
||||
|
||||
|
||||
|
||||
### 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 = BooksApi();
|
||||
final id = id_example; // String |
|
||||
final book = Book(); // Book |
|
||||
|
||||
try {
|
||||
final result = api_instance.booksUpdate(id, book);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling BooksApi->booksUpdate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **String**| |
|
||||
**book** | [**Book**](Book.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**MultipartFile**](MultipartFile.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[bearer](../README.md#bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **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)
|
||||
|
||||
20
mycore_api/doc/Condition.md
Normal file
20
mycore_api/doc/Condition.md
Normal file
@ -0,0 +1,20 @@
|
||||
# mycoreapi.model.Condition
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**deviceId** | **String** | | [optional]
|
||||
**state** | [**OneOfState**](OneOfState.md) | | [optional]
|
||||
**startTime** | **String** | | [optional]
|
||||
**endTime** | **String** | | [optional]
|
||||
**type** | [**ConditionType**](ConditionType.md) | | [optional]
|
||||
**value** | [**ConditionValue**](ConditionValue.md) | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
14
mycore_api/doc/ConditionType.md
Normal file
14
mycore_api/doc/ConditionType.md
Normal file
@ -0,0 +1,14 @@
|
||||
# mycoreapi.model.ConditionType
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
14
mycore_api/doc/ConditionValue.md
Normal file
14
mycore_api/doc/ConditionValue.md
Normal file
@ -0,0 +1,14 @@
|
||||
# mycoreapi.model.ConditionValue
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
14
mycore_api/doc/ConnectionStatus.md
Normal file
14
mycore_api/doc/ConnectionStatus.md
Normal file
@ -0,0 +1,14 @@
|
||||
# mycoreapi.model.ConnectionStatus
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
40
mycore_api/doc/Device.md
Normal file
40
mycore_api/doc/Device.md
Normal file
@ -0,0 +1,40 @@
|
||||
# mycoreapi.model.Device
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**userId** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**description** | **String** | | [optional]
|
||||
**model** | **String** | | [optional]
|
||||
**port** | **int** | | [optional]
|
||||
**firmwareVersion** | **String** | | [optional]
|
||||
**hardwareVersion** | **String** | | [optional]
|
||||
**status** | **bool** | | [optional]
|
||||
**type** | [**DeviceType**](DeviceType.md) | | [optional]
|
||||
**connectionStatus** | [**ConnectionStatus**](ConnectionStatus.md) | | [optional]
|
||||
**locationId** | **String** | | [optional]
|
||||
**meansOfCommunications** | [**List<MeansOfCommunication>**](MeansOfCommunication.md) | | [optional] [default to const []]
|
||||
**createdDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**updatedDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**lastState** | **String** | | [optional]
|
||||
**lastStateDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**ipAddress** | **String** | | [optional]
|
||||
**serviceIdentification** | **String** | | [optional]
|
||||
**battery** | **bool** | | [optional]
|
||||
**batteryStatus** | **int** | | [optional]
|
||||
**providerId** | **String** | | [optional]
|
||||
**manufacturerName** | **String** | | [optional]
|
||||
**groupIds** | **List<String>** | | [optional] [default to const []]
|
||||
**properties** | [**Map<String, Object>**](Object.md) | | [optional] [default to const {}]
|
||||
**supportedOperations** | **List<String>** | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
507
mycore_api/doc/DeviceApi.md
Normal file
507
mycore_api/doc/DeviceApi.md
Normal file
@ -0,0 +1,507 @@
|
||||
# mycoreapi.api.DeviceApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://192.168.31.140*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**deviceCreate**](DeviceApi.md#devicecreate) | **POST** /api/device | Create a device
|
||||
[**deviceCreateDevicesFromProvider**](DeviceApi.md#devicecreatedevicesfromprovider) | **POST** /api/device/{userId}/fromProvider/{providerId} | Create devices from provider
|
||||
[**deviceDelete**](DeviceApi.md#devicedelete) | **DELETE** /api/device/{deviceId} | Delete a device
|
||||
[**deviceDeleteAllForUser**](DeviceApi.md#devicedeleteallforuser) | **DELETE** /api/device/user/{userId} | Delete all device for a specified
|
||||
[**deviceDeleteDevicesFromProvider**](DeviceApi.md#devicedeletedevicesfromprovider) | **DELETE** /api/device/{userId}/fromProvider/{providerId} | Delete devices from provider
|
||||
[**deviceGetAll**](DeviceApi.md#devicegetall) | **GET** /api/device/{userId} | Get all devices summary
|
||||
[**deviceGetDetail**](DeviceApi.md#devicegetdetail) | **GET** /api/device/detail/{deviceId} | Get a specific device info
|
||||
[**deviceGetDevicesByType**](DeviceApi.md#devicegetdevicesbytype) | **GET** /api/device/{userId}/type/{type} | Get list of devices from a type
|
||||
[**deviceGetDevicesFromProvider**](DeviceApi.md#devicegetdevicesfromprovider) | **GET** /api/device/{userId}/fromProvider/{providerId} | Get devices from provider
|
||||
[**deviceGetDevicesFromZigbee2Mqtt**](DeviceApi.md#devicegetdevicesfromzigbee2mqtt) | **GET** /api/device/zigbee2Mqtt/{userId} | Get all zigbee2Mqtt devices
|
||||
[**deviceUpdate**](DeviceApi.md#deviceupdate) | **PUT** /api/device/{deviceId} | Update a device
|
||||
|
||||
|
||||
# **deviceCreate**
|
||||
> DeviceDetailDTO deviceCreate(deviceDetailDTO)
|
||||
|
||||
Create a device
|
||||
|
||||
### 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 = DeviceApi();
|
||||
final deviceDetailDTO = DeviceDetailDTO(); // DeviceDetailDTO | Device to create
|
||||
|
||||
try {
|
||||
final result = api_instance.deviceCreate(deviceDetailDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling DeviceApi->deviceCreate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**deviceDetailDTO** | [**DeviceDetailDTO**](DeviceDetailDTO.md)| Device to create |
|
||||
|
||||
### Return type
|
||||
|
||||
[**DeviceDetailDTO**](DeviceDetailDTO.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)
|
||||
|
||||
# **deviceCreateDevicesFromProvider**
|
||||
> List<DeviceDetailDTO> deviceCreateDevicesFromProvider(userId, providerId)
|
||||
|
||||
Create devices from provider
|
||||
|
||||
### 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 = DeviceApi();
|
||||
final userId = userId_example; // String | User Id
|
||||
final providerId = providerId_example; // String | Id of Provider
|
||||
|
||||
try {
|
||||
final result = api_instance.deviceCreateDevicesFromProvider(userId, providerId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling DeviceApi->deviceCreateDevicesFromProvider: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**userId** | **String**| User Id |
|
||||
**providerId** | **String**| Id of Provider |
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<DeviceDetailDTO>**](DeviceDetailDTO.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)
|
||||
|
||||
# **deviceDelete**
|
||||
> MultipartFile deviceDelete(deviceId)
|
||||
|
||||
Delete a device
|
||||
|
||||
### 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 = DeviceApi();
|
||||
final deviceId = deviceId_example; // String | Id of device to delete
|
||||
|
||||
try {
|
||||
final result = api_instance.deviceDelete(deviceId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling DeviceApi->deviceDelete: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**deviceId** | **String**| Id of device 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)
|
||||
|
||||
# **deviceDeleteAllForUser**
|
||||
> MultipartFile deviceDeleteAllForUser(userId)
|
||||
|
||||
Delete all device 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 = DeviceApi();
|
||||
final userId = userId_example; // String | Id of user
|
||||
|
||||
try {
|
||||
final result = api_instance.deviceDeleteAllForUser(userId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling DeviceApi->deviceDeleteAllForUser: $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)
|
||||
|
||||
# **deviceDeleteDevicesFromProvider**
|
||||
> MultipartFile deviceDeleteDevicesFromProvider(userId, providerId)
|
||||
|
||||
Delete devices from provider
|
||||
|
||||
### 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 = DeviceApi();
|
||||
final userId = userId_example; // String | User Id
|
||||
final providerId = providerId_example; // String | Id of Provider
|
||||
|
||||
try {
|
||||
final result = api_instance.deviceDeleteDevicesFromProvider(userId, providerId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling DeviceApi->deviceDeleteDevicesFromProvider: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**userId** | **String**| User Id |
|
||||
**providerId** | **String**| Id of Provider |
|
||||
|
||||
### 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)
|
||||
|
||||
# **deviceGetAll**
|
||||
> List<DeviceSummaryDTO> deviceGetAll(userId)
|
||||
|
||||
Get all devices summary
|
||||
|
||||
### 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 = DeviceApi();
|
||||
final userId = userId_example; // String | Id of user
|
||||
|
||||
try {
|
||||
final result = api_instance.deviceGetAll(userId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling DeviceApi->deviceGetAll: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**userId** | **String**| Id of user |
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<DeviceSummaryDTO>**](DeviceSummaryDTO.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)
|
||||
|
||||
# **deviceGetDetail**
|
||||
> DeviceDetailDTO deviceGetDetail(deviceId)
|
||||
|
||||
Get a specific device info
|
||||
|
||||
### 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 = DeviceApi();
|
||||
final deviceId = deviceId_example; // String | id of device
|
||||
|
||||
try {
|
||||
final result = api_instance.deviceGetDetail(deviceId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling DeviceApi->deviceGetDetail: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**deviceId** | **String**| id of device |
|
||||
|
||||
### Return type
|
||||
|
||||
[**DeviceDetailDTO**](DeviceDetailDTO.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)
|
||||
|
||||
# **deviceGetDevicesByType**
|
||||
> List<DeviceDetailDTO> deviceGetDevicesByType(userId, type)
|
||||
|
||||
Get list of devices from a type
|
||||
|
||||
### 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 = DeviceApi();
|
||||
final userId = userId_example; // String | user Id
|
||||
final type = ; // DeviceType | device type
|
||||
|
||||
try {
|
||||
final result = api_instance.deviceGetDevicesByType(userId, type);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling DeviceApi->deviceGetDevicesByType: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**userId** | **String**| user Id |
|
||||
**type** | [**DeviceType**](.md)| device type |
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<DeviceDetailDTO>**](DeviceDetailDTO.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)
|
||||
|
||||
# **deviceGetDevicesFromProvider**
|
||||
> List<DeviceDetailDTO> deviceGetDevicesFromProvider(userId, providerId)
|
||||
|
||||
Get devices from provider
|
||||
|
||||
### 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 = DeviceApi();
|
||||
final userId = userId_example; // String | User Id
|
||||
final providerId = providerId_example; // String | Id of Provider
|
||||
|
||||
try {
|
||||
final result = api_instance.deviceGetDevicesFromProvider(userId, providerId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling DeviceApi->deviceGetDevicesFromProvider: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**userId** | **String**| User Id |
|
||||
**providerId** | **String**| Id of Provider |
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<DeviceDetailDTO>**](DeviceDetailDTO.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)
|
||||
|
||||
# **deviceGetDevicesFromZigbee2Mqtt**
|
||||
> List<DeviceDetailDTO> deviceGetDevicesFromZigbee2Mqtt(userId)
|
||||
|
||||
Get all zigbee2Mqtt devices
|
||||
|
||||
### 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 = DeviceApi();
|
||||
final userId = userId_example; // String | User Id
|
||||
|
||||
try {
|
||||
final result = api_instance.deviceGetDevicesFromZigbee2Mqtt(userId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling DeviceApi->deviceGetDevicesFromZigbee2Mqtt: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**userId** | **String**| User Id |
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<DeviceDetailDTO>**](DeviceDetailDTO.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)
|
||||
|
||||
# **deviceUpdate**
|
||||
> DeviceDetailDTO deviceUpdate(deviceId, deviceDetailDTO)
|
||||
|
||||
Update a device
|
||||
|
||||
### 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 = DeviceApi();
|
||||
final deviceId = deviceId_example; // String |
|
||||
final deviceDetailDTO = DeviceDetailDTO(); // DeviceDetailDTO | Device to update
|
||||
|
||||
try {
|
||||
final result = api_instance.deviceUpdate(deviceId, deviceDetailDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling DeviceApi->deviceUpdate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**deviceId** | **String**| |
|
||||
**deviceDetailDTO** | [**DeviceDetailDTO**](DeviceDetailDTO.md)| Device to update |
|
||||
|
||||
### Return type
|
||||
|
||||
[**DeviceDetailDTO**](DeviceDetailDTO.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)
|
||||
|
||||
42
mycore_api/doc/DeviceDetailDTO.md
Normal file
42
mycore_api/doc/DeviceDetailDTO.md
Normal file
@ -0,0 +1,42 @@
|
||||
# mycoreapi.model.DeviceDetailDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**userId** | **String** | | [optional]
|
||||
**description** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**model** | **String** | | [optional]
|
||||
**type** | [**DeviceType**](DeviceType.md) | | [optional]
|
||||
**status** | **bool** | | [optional]
|
||||
**connectionStatus** | [**ConnectionStatus**](ConnectionStatus.md) | | [optional]
|
||||
**locationId** | **String** | | [optional]
|
||||
**providerId** | **String** | | [optional]
|
||||
**providerName** | **String** | | [optional]
|
||||
**location** | [**OneOfLocationDTO**](OneOfLocationDTO.md) | | [optional]
|
||||
**lastStateDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**battery** | **bool** | | [optional]
|
||||
**batteryStatus** | **int** | | [optional]
|
||||
**firmwareVersion** | **String** | | [optional]
|
||||
**hardwareVersion** | **String** | | [optional]
|
||||
**port** | **int** | | [optional]
|
||||
**meansOfCommunications** | [**List<MeansOfCommunication>**](MeansOfCommunication.md) | | [optional] [default to const []]
|
||||
**createdDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**updatedDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**lastState** | **String** | | [optional]
|
||||
**ipAddress** | **String** | | [optional]
|
||||
**serviceIdentification** | **String** | | [optional]
|
||||
**manufacturerName** | **String** | | [optional]
|
||||
**groupIds** | **List<String>** | | [optional] [default to const []]
|
||||
**properties** | [**Map<String, Object>**](Object.md) | | [optional] [default to const {}]
|
||||
**supportedOperations** | **List<String>** | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
27
mycore_api/doc/DeviceDetailDTOAllOf.md
Normal file
27
mycore_api/doc/DeviceDetailDTOAllOf.md
Normal file
@ -0,0 +1,27 @@
|
||||
# mycoreapi.model.DeviceDetailDTOAllOf
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**firmwareVersion** | **String** | | [optional]
|
||||
**hardwareVersion** | **String** | | [optional]
|
||||
**port** | **int** | | [optional]
|
||||
**meansOfCommunications** | [**List<MeansOfCommunication>**](MeansOfCommunication.md) | | [optional] [default to const []]
|
||||
**createdDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**updatedDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**lastState** | **String** | | [optional]
|
||||
**ipAddress** | **String** | | [optional]
|
||||
**serviceIdentification** | **String** | | [optional]
|
||||
**manufacturerName** | **String** | | [optional]
|
||||
**groupIds** | **List<String>** | | [optional] [default to const []]
|
||||
**properties** | [**Map<String, Object>**](Object.md) | | [optional] [default to const {}]
|
||||
**supportedOperations** | **List<String>** | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
29
mycore_api/doc/DeviceSummaryDTO.md
Normal file
29
mycore_api/doc/DeviceSummaryDTO.md
Normal file
@ -0,0 +1,29 @@
|
||||
# mycoreapi.model.DeviceSummaryDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**userId** | **String** | | [optional]
|
||||
**description** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**model** | **String** | | [optional]
|
||||
**type** | [**DeviceType**](DeviceType.md) | | [optional]
|
||||
**status** | **bool** | | [optional]
|
||||
**connectionStatus** | [**ConnectionStatus**](ConnectionStatus.md) | | [optional]
|
||||
**locationId** | **String** | | [optional]
|
||||
**providerId** | **String** | | [optional]
|
||||
**providerName** | **String** | | [optional]
|
||||
**location** | [**OneOfLocationDTO**](OneOfLocationDTO.md) | | [optional]
|
||||
**lastStateDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**battery** | **bool** | | [optional]
|
||||
**batteryStatus** | **int** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
14
mycore_api/doc/DeviceType.md
Normal file
14
mycore_api/doc/DeviceType.md
Normal file
@ -0,0 +1,14 @@
|
||||
# mycoreapi.model.DeviceType
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
20
mycore_api/doc/ElectricityProduction.md
Normal file
20
mycore_api/doc/ElectricityProduction.md
Normal file
@ -0,0 +1,20 @@
|
||||
# mycoreapi.model.ElectricityProduction
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**deviceId** | **String** | | [optional]
|
||||
**userId** | **String** | | [optional]
|
||||
**watt** | **double** | | [optional]
|
||||
**ampere** | **double** | | [optional]
|
||||
**timestamp** | [**DateTime**](DateTime.md) | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
59
mycore_api/doc/EnergyApi.md
Normal file
59
mycore_api/doc/EnergyApi.md
Normal file
@ -0,0 +1,59 @@
|
||||
# mycoreapi.api.EnergyApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://192.168.31.140*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**energyGetElectricityProduction**](EnergyApi.md#energygetelectricityproduction) | **GET** /api/energy/electricity | Get summary production of Kwh/Year
|
||||
|
||||
|
||||
# **energyGetElectricityProduction**
|
||||
> List<ElectricityProduction> energyGetElectricityProduction(userId, viewBy)
|
||||
|
||||
Get summary production of Kwh/Year
|
||||
|
||||
### 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 = EnergyApi();
|
||||
final userId = userId_example; // String |
|
||||
final viewBy = ; // ViewBy |
|
||||
|
||||
try {
|
||||
final result = api_instance.energyGetElectricityProduction(userId, viewBy);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling EnergyApi->energyGetElectricityProduction: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**userId** | **String**| | [optional]
|
||||
**viewBy** | [**ViewBy**](.md)| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<ElectricityProduction>**](ElectricityProduction.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)
|
||||
|
||||
57
mycore_api/doc/FacebookApi.md
Normal file
57
mycore_api/doc/FacebookApi.md
Normal file
@ -0,0 +1,57 @@
|
||||
# mycoreapi.api.FacebookApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://192.168.31.140*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**facebookCreate**](FacebookApi.md#facebookcreate) | **POST** /facebook |
|
||||
|
||||
|
||||
# **facebookCreate**
|
||||
> MultipartFile facebookCreate(facebookAuthModel)
|
||||
|
||||
|
||||
|
||||
### 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 = FacebookApi();
|
||||
final facebookAuthModel = FacebookAuthModel(); // FacebookAuthModel |
|
||||
|
||||
try {
|
||||
final result = api_instance.facebookCreate(facebookAuthModel);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling FacebookApi->facebookCreate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**facebookAuthModel** | [**FacebookAuthModel**](FacebookAuthModel.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**MultipartFile**](MultipartFile.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[bearer](../README.md#bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **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)
|
||||
|
||||
15
mycore_api/doc/FacebookAuthModel.md
Normal file
15
mycore_api/doc/FacebookAuthModel.md
Normal file
@ -0,0 +1,15 @@
|
||||
# mycoreapi.model.FacebookAuthModel
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**userAccessToken** | **String** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
57
mycore_api/doc/GoogleApi.md
Normal file
57
mycore_api/doc/GoogleApi.md
Normal file
@ -0,0 +1,57 @@
|
||||
# mycoreapi.api.GoogleApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://192.168.31.140*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**googleCreate**](GoogleApi.md#googlecreate) | **POST** /google |
|
||||
|
||||
|
||||
# **googleCreate**
|
||||
> MultipartFile googleCreate(googleAuthModel)
|
||||
|
||||
|
||||
|
||||
### 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 = GoogleApi();
|
||||
final googleAuthModel = GoogleAuthModel(); // GoogleAuthModel |
|
||||
|
||||
try {
|
||||
final result = api_instance.googleCreate(googleAuthModel);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling GoogleApi->googleCreate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**googleAuthModel** | [**GoogleAuthModel**](GoogleAuthModel.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**MultipartFile**](MultipartFile.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[bearer](../README.md#bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **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)
|
||||
|
||||
16
mycore_api/doc/GoogleAuthModel.md
Normal file
16
mycore_api/doc/GoogleAuthModel.md
Normal file
@ -0,0 +1,16 @@
|
||||
# mycoreapi.model.GoogleAuthModel
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**authorizationCode** | **String** | | [optional]
|
||||
**apiKey** | **String** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
23
mycore_api/doc/Group.md
Normal file
23
mycore_api/doc/Group.md
Normal file
@ -0,0 +1,23 @@
|
||||
# mycoreapi.model.Group
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**userId** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**type** | **String** | | [optional]
|
||||
**serviceIdentification** | **int** | | [optional]
|
||||
**isAlarm** | **bool** | | [optional]
|
||||
**createdDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**updatedDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**devicesIds** | **List<String>** | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
459
mycore_api/doc/GroupApi.md
Normal file
459
mycore_api/doc/GroupApi.md
Normal file
@ -0,0 +1,459 @@
|
||||
# mycoreapi.api.GroupApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://192.168.31.140*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**groupCreate**](GroupApi.md#groupcreate) | **POST** /api/group | Create a group
|
||||
[**groupCreateDevicesFromZigbee2Mqtt**](GroupApi.md#groupcreatedevicesfromzigbee2mqtt) | **POST** /api/group/{userId}/fromZigbee | Create groups from provider
|
||||
[**groupDelete**](GroupApi.md#groupdelete) | **DELETE** /api/group/{groupId}/device/{deviceId} | Delete device from a group
|
||||
[**groupDelete2**](GroupApi.md#groupdelete2) | **DELETE** /api/group/{groupId} | Delete a group
|
||||
[**groupDeleteAllForUser**](GroupApi.md#groupdeleteallforuser) | **DELETE** /api/group/user/{userId} | Delete all group for a specified
|
||||
[**groupGetAll**](GroupApi.md#groupgetall) | **GET** /api/group/{userId} | Get all groups for the specified user
|
||||
[**groupGetDetail**](GroupApi.md#groupgetdetail) | **GET** /api/group/detail/{groupId} | Get detail info of a specified group
|
||||
[**groupGetGroupsByType**](GroupApi.md#groupgetgroupsbytype) | **GET** /api/group/{userId}/type/{type} | Get list of group from a type
|
||||
[**groupGetGroupsFromZigbee2Mqtt**](GroupApi.md#groupgetgroupsfromzigbee2mqtt) | **GET** /api/group/zigbee2Mqtt/{userId} | Get all zigbee2Mqtt groups
|
||||
[**groupUpdate**](GroupApi.md#groupupdate) | **PUT** /api/group | Update a group
|
||||
|
||||
|
||||
# **groupCreate**
|
||||
> GroupDetailDTO groupCreate(groupCreateOrUpdateDetailDTO)
|
||||
|
||||
Create a group
|
||||
|
||||
### 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 = GroupApi();
|
||||
final groupCreateOrUpdateDetailDTO = GroupCreateOrUpdateDetailDTO(); // GroupCreateOrUpdateDetailDTO | Group to create
|
||||
|
||||
try {
|
||||
final result = api_instance.groupCreate(groupCreateOrUpdateDetailDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling GroupApi->groupCreate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**groupCreateOrUpdateDetailDTO** | [**GroupCreateOrUpdateDetailDTO**](GroupCreateOrUpdateDetailDTO.md)| Group to create |
|
||||
|
||||
### Return type
|
||||
|
||||
[**GroupDetailDTO**](GroupDetailDTO.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)
|
||||
|
||||
# **groupCreateDevicesFromZigbee2Mqtt**
|
||||
> List<GroupDetailDTO> groupCreateDevicesFromZigbee2Mqtt(userId)
|
||||
|
||||
Create groups from provider
|
||||
|
||||
### 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 = GroupApi();
|
||||
final userId = userId_example; // String | User Id
|
||||
|
||||
try {
|
||||
final result = api_instance.groupCreateDevicesFromZigbee2Mqtt(userId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling GroupApi->groupCreateDevicesFromZigbee2Mqtt: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**userId** | **String**| User Id |
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<GroupDetailDTO>**](GroupDetailDTO.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)
|
||||
|
||||
# **groupDelete**
|
||||
> MultipartFile groupDelete(deviceId, groupId)
|
||||
|
||||
Delete device from a group
|
||||
|
||||
### 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 = GroupApi();
|
||||
final deviceId = deviceId_example; // String | Id of device to delete from the group
|
||||
final groupId = groupId_example; // String | Id of group
|
||||
|
||||
try {
|
||||
final result = api_instance.groupDelete(deviceId, groupId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling GroupApi->groupDelete: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**deviceId** | **String**| Id of device to delete from the group |
|
||||
**groupId** | **String**| Id of group |
|
||||
|
||||
### 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)
|
||||
|
||||
# **groupDelete2**
|
||||
> MultipartFile groupDelete2(groupId)
|
||||
|
||||
Delete a group
|
||||
|
||||
### 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 = GroupApi();
|
||||
final groupId = groupId_example; // String | Id of group
|
||||
|
||||
try {
|
||||
final result = api_instance.groupDelete2(groupId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling GroupApi->groupDelete2: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**groupId** | **String**| Id of group |
|
||||
|
||||
### 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)
|
||||
|
||||
# **groupDeleteAllForUser**
|
||||
> MultipartFile groupDeleteAllForUser(userId)
|
||||
|
||||
Delete all group 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 = GroupApi();
|
||||
final userId = userId_example; // String | Id of user
|
||||
|
||||
try {
|
||||
final result = api_instance.groupDeleteAllForUser(userId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling GroupApi->groupDeleteAllForUser: $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)
|
||||
|
||||
# **groupGetAll**
|
||||
> List<GroupSummaryDTO> groupGetAll(userId)
|
||||
|
||||
Get all groups 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 = GroupApi();
|
||||
final userId = userId_example; // String | Id of user
|
||||
|
||||
try {
|
||||
final result = api_instance.groupGetAll(userId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling GroupApi->groupGetAll: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**userId** | **String**| Id of user |
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<GroupSummaryDTO>**](GroupSummaryDTO.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)
|
||||
|
||||
# **groupGetDetail**
|
||||
> GroupDetailDTO groupGetDetail(groupId, userId)
|
||||
|
||||
Get detail info of a specified group
|
||||
|
||||
### 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 = GroupApi();
|
||||
final groupId = groupId_example; // String | groupid
|
||||
final userId = userId_example; // String | user id
|
||||
|
||||
try {
|
||||
final result = api_instance.groupGetDetail(groupId, userId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling GroupApi->groupGetDetail: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**groupId** | **String**| groupid |
|
||||
**userId** | **String**| user id | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**GroupDetailDTO**](GroupDetailDTO.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)
|
||||
|
||||
# **groupGetGroupsByType**
|
||||
> List<GroupSummaryDTO> groupGetGroupsByType(userId, type)
|
||||
|
||||
Get list of group from a type
|
||||
|
||||
### 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 = GroupApi();
|
||||
final userId = userId_example; // String | user Id
|
||||
final type = type_example; // String | group type
|
||||
|
||||
try {
|
||||
final result = api_instance.groupGetGroupsByType(userId, type);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling GroupApi->groupGetGroupsByType: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**userId** | **String**| user Id |
|
||||
**type** | **String**| group type |
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<GroupSummaryDTO>**](GroupSummaryDTO.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)
|
||||
|
||||
# **groupGetGroupsFromZigbee2Mqtt**
|
||||
> List<GroupDetailDTO> groupGetGroupsFromZigbee2Mqtt(userId)
|
||||
|
||||
Get all zigbee2Mqtt groups
|
||||
|
||||
### 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 = GroupApi();
|
||||
final userId = userId_example; // String | User Id
|
||||
|
||||
try {
|
||||
final result = api_instance.groupGetGroupsFromZigbee2Mqtt(userId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling GroupApi->groupGetGroupsFromZigbee2Mqtt: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**userId** | **String**| User Id |
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<GroupDetailDTO>**](GroupDetailDTO.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)
|
||||
|
||||
# **groupUpdate**
|
||||
> GroupCreateOrUpdateDetailDTO groupUpdate(groupCreateOrUpdateDetailDTO)
|
||||
|
||||
Update a group
|
||||
|
||||
### 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 = GroupApi();
|
||||
final groupCreateOrUpdateDetailDTO = GroupCreateOrUpdateDetailDTO(); // GroupCreateOrUpdateDetailDTO | group to update
|
||||
|
||||
try {
|
||||
final result = api_instance.groupUpdate(groupCreateOrUpdateDetailDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling GroupApi->groupUpdate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**groupCreateOrUpdateDetailDTO** | [**GroupCreateOrUpdateDetailDTO**](GroupCreateOrUpdateDetailDTO.md)| group to update |
|
||||
|
||||
### Return type
|
||||
|
||||
[**GroupCreateOrUpdateDetailDTO**](GroupCreateOrUpdateDetailDTO.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)
|
||||
|
||||
20
mycore_api/doc/GroupCreateOrUpdateDetailDTO.md
Normal file
20
mycore_api/doc/GroupCreateOrUpdateDetailDTO.md
Normal file
@ -0,0 +1,20 @@
|
||||
# mycoreapi.model.GroupCreateOrUpdateDetailDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**userId** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**type** | **String** | | [optional]
|
||||
**isAlarm** | **bool** | | [optional]
|
||||
**deviceIds** | **List<String>** | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
15
mycore_api/doc/GroupCreateOrUpdateDetailDTOAllOf.md
Normal file
15
mycore_api/doc/GroupCreateOrUpdateDetailDTOAllOf.md
Normal file
@ -0,0 +1,15 @@
|
||||
# mycoreapi.model.GroupCreateOrUpdateDetailDTOAllOf
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**deviceIds** | **List<String>** | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
22
mycore_api/doc/GroupDetailDTO.md
Normal file
22
mycore_api/doc/GroupDetailDTO.md
Normal file
@ -0,0 +1,22 @@
|
||||
# mycoreapi.model.GroupDetailDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**userId** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**type** | **String** | | [optional]
|
||||
**isAlarm** | **bool** | | [optional]
|
||||
**createdDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**updatedDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**devices** | [**List<DeviceDetailDTO>**](DeviceDetailDTO.md) | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
17
mycore_api/doc/GroupDetailDTOAllOf.md
Normal file
17
mycore_api/doc/GroupDetailDTOAllOf.md
Normal file
@ -0,0 +1,17 @@
|
||||
# mycoreapi.model.GroupDetailDTOAllOf
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**createdDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**updatedDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**devices** | [**List<DeviceDetailDTO>**](DeviceDetailDTO.md) | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
19
mycore_api/doc/GroupSummaryDTO.md
Normal file
19
mycore_api/doc/GroupSummaryDTO.md
Normal file
@ -0,0 +1,19 @@
|
||||
# mycoreapi.model.GroupSummaryDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**userId** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**type** | **String** | | [optional]
|
||||
**isAlarm** | **bool** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
151
mycore_api/doc/IOTApi.md
Normal file
151
mycore_api/doc/IOTApi.md
Normal file
@ -0,0 +1,151 @@
|
||||
# mycoreapi.api.IOTApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://192.168.31.140*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**iOTGetSmartPrinterMessages**](IOTApi.md#iotgetsmartprintermessages) | **GET** /api/iot/smartprinter/{idDevice} | Retrieve all SmartPrinterMessage
|
||||
[**iOTPostToDBPrinter**](IOTApi.md#iotposttodbprinter) | **POST** /api/iot/smartprinter/{idDevice} | It's the method to post data from mqtt broker to Database (Thanks Rpi!)
|
||||
[**iOTPostToDBSmartGarden**](IOTApi.md#iotposttodbsmartgarden) | **POST** /api/iot/smartgarden/{idDevice} | It's the method to post data from mqtt broker to Database (Thanks Rpi!)
|
||||
|
||||
|
||||
# **iOTGetSmartPrinterMessages**
|
||||
> List<SmartPrinterMessage> iOTGetSmartPrinterMessages(idDevice, id)
|
||||
|
||||
Retrieve all SmartPrinterMessage
|
||||
|
||||
### 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 = IOTApi();
|
||||
final idDevice = idDevice_example; // String |
|
||||
final id = 56; // int | Id of the smart printer message
|
||||
|
||||
try {
|
||||
final result = api_instance.iOTGetSmartPrinterMessages(idDevice, id);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling IOTApi->iOTGetSmartPrinterMessages: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**idDevice** | **String**| |
|
||||
**id** | **int**| Id of the smart printer message | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<SmartPrinterMessage>**](SmartPrinterMessage.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)
|
||||
|
||||
# **iOTPostToDBPrinter**
|
||||
> MultipartFile iOTPostToDBPrinter(idDevice, smartPrinterMessage)
|
||||
|
||||
It's the method to post data from mqtt broker to Database (Thanks Rpi!)
|
||||
|
||||
### 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 = IOTApi();
|
||||
final idDevice = 56; // int | Id of the device to upload to DB
|
||||
final smartPrinterMessage = [List<SmartPrinterMessage>()]; // List<SmartPrinterMessage> | Content that will be uploaded
|
||||
|
||||
try {
|
||||
final result = api_instance.iOTPostToDBPrinter(idDevice, smartPrinterMessage);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling IOTApi->iOTPostToDBPrinter: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**idDevice** | **int**| Id of the device to upload to DB |
|
||||
**smartPrinterMessage** | [**List<SmartPrinterMessage>**](SmartPrinterMessage.md)| Content that will be uploaded |
|
||||
|
||||
### Return type
|
||||
|
||||
[**MultipartFile**](MultipartFile.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[bearer](../README.md#bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **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)
|
||||
|
||||
# **iOTPostToDBSmartGarden**
|
||||
> MultipartFile iOTPostToDBSmartGarden(idDevice, smartGardenMessage)
|
||||
|
||||
It's the method to post data from mqtt broker to Database (Thanks Rpi!)
|
||||
|
||||
### 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 = IOTApi();
|
||||
final idDevice = 56; // int |
|
||||
final smartGardenMessage = [List<SmartGardenMessage>()]; // List<SmartGardenMessage> |
|
||||
|
||||
try {
|
||||
final result = api_instance.iOTPostToDBSmartGarden(idDevice, smartGardenMessage);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling IOTApi->iOTPostToDBSmartGarden: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**idDevice** | **int**| |
|
||||
**smartGardenMessage** | [**List<SmartGardenMessage>**](SmartGardenMessage.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**MultipartFile**](MultipartFile.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[bearer](../README.md#bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **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)
|
||||
|
||||
53
mycore_api/doc/LayoutApi.md
Normal file
53
mycore_api/doc/LayoutApi.md
Normal file
@ -0,0 +1,53 @@
|
||||
# mycoreapi.api.LayoutApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://192.168.31.140*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**layoutGet**](LayoutApi.md#layoutget) | **GET** /api/layout/panelSection | It's a test ! :)
|
||||
|
||||
|
||||
# **layoutGet**
|
||||
> List<PanelSection> layoutGet()
|
||||
|
||||
It's a test ! :)
|
||||
|
||||
### 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 = LayoutApi();
|
||||
|
||||
try {
|
||||
final result = api_instance.layoutGet();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling LayoutApi->layoutGet: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<PanelSection>**](PanelSection.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)
|
||||
|
||||
16
mycore_api/doc/LocationDTO.md
Normal file
16
mycore_api/doc/LocationDTO.md
Normal file
@ -0,0 +1,16 @@
|
||||
# mycoreapi.model.LocationDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
16
mycore_api/doc/LoginDTO.md
Normal file
16
mycore_api/doc/LoginDTO.md
Normal file
@ -0,0 +1,16 @@
|
||||
# mycoreapi.model.LoginDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**email** | **String** | | [optional]
|
||||
**password** | **String** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
57
mycore_api/doc/MQTTApi.md
Normal file
57
mycore_api/doc/MQTTApi.md
Normal file
@ -0,0 +1,57 @@
|
||||
# mycoreapi.api.MQTTApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://192.168.31.140*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**mQTTPublishMessage**](MQTTApi.md#mqttpublishmessage) | **POST** /api/mqtt | Publish mqtt test
|
||||
|
||||
|
||||
# **mQTTPublishMessage**
|
||||
> bool mQTTPublishMessage(mqttMessageDTO)
|
||||
|
||||
Publish mqtt test
|
||||
|
||||
### 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 = MQTTApi();
|
||||
final mqttMessageDTO = MqttMessageDTO(); // MqttMessageDTO | Message to send
|
||||
|
||||
try {
|
||||
final result = api_instance.mQTTPublishMessage(mqttMessageDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling MQTTApi->mQTTPublishMessage: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**mqttMessageDTO** | [**MqttMessageDTO**](MqttMessageDTO.md)| Message to send |
|
||||
|
||||
### Return type
|
||||
|
||||
**bool**
|
||||
|
||||
### 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)
|
||||
|
||||
14
mycore_api/doc/MeansOfCommunication.md
Normal file
14
mycore_api/doc/MeansOfCommunication.md
Normal file
@ -0,0 +1,14 @@
|
||||
# mycoreapi.model.MeansOfCommunication
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
17
mycore_api/doc/MqttMessageDTO.md
Normal file
17
mycore_api/doc/MqttMessageDTO.md
Normal file
@ -0,0 +1,17 @@
|
||||
# mycoreapi.model.MqttMessageDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**topic** | **String** | | [optional]
|
||||
**message** | **String** | | [optional]
|
||||
**online** | **bool** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
103
mycore_api/doc/OddApi.md
Normal file
103
mycore_api/doc/OddApi.md
Normal file
@ -0,0 +1,103 @@
|
||||
# mycoreapi.api.OddApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://192.168.31.140*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**oddGetAll**](OddApi.md#oddgetall) | **GET** /api/odd/{oddRequest} | Get odds for one country and one odd value maximum
|
||||
[**oddGetForCountry**](OddApi.md#oddgetforcountry) | **GET** /api/odd/country/{id}/{oddRequest} | Get odds for one country and one odd value maximum
|
||||
|
||||
|
||||
# **oddGetAll**
|
||||
> List<OddNice> oddGetAll(oddRequest)
|
||||
|
||||
Get odds for one country and one odd value maximum
|
||||
|
||||
### 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 = OddApi();
|
||||
final oddRequest = 1.2; // double | Odd Maximum value
|
||||
|
||||
try {
|
||||
final result = api_instance.oddGetAll(oddRequest);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling OddApi->oddGetAll: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**oddRequest** | **double**| Odd Maximum value |
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<OddNice>**](OddNice.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)
|
||||
|
||||
# **oddGetForCountry**
|
||||
> List<OddNice> oddGetForCountry(id, oddRequest)
|
||||
|
||||
Get odds for one country and one odd value maximum
|
||||
|
||||
### 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 = OddApi();
|
||||
final id = id_example; // String | id of country, e.g = BE for Belgium
|
||||
final oddRequest = 1.2; // double | Odd Maximum value
|
||||
|
||||
try {
|
||||
final result = api_instance.oddGetForCountry(id, oddRequest);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling OddApi->oddGetForCountry: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **String**| id of country, e.g = BE for Belgium |
|
||||
**oddRequest** | **double**| Odd Maximum value |
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<OddNice>**](OddNice.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)
|
||||
|
||||
17
mycore_api/doc/OddH2H.md
Normal file
17
mycore_api/doc/OddH2H.md
Normal file
@ -0,0 +1,17 @@
|
||||
# mycoreapi.model.OddH2H
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**homeOdd** | **double** | | [optional]
|
||||
**drawOdd** | **double** | | [optional]
|
||||
**visitOdd** | **double** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
18
mycore_api/doc/OddNice.md
Normal file
18
mycore_api/doc/OddNice.md
Normal file
@ -0,0 +1,18 @@
|
||||
# mycoreapi.model.OddNice
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**teams** | **List<String>** | | [optional] [default to const []]
|
||||
**commenceTime** | **int** | | [optional]
|
||||
**homeTeam** | **String** | | [optional]
|
||||
**odds** | [**OneOfOddH2H**](OneOfOddH2H.md) | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
21
mycore_api/doc/PanelMenuItem.md
Normal file
21
mycore_api/doc/PanelMenuItem.md
Normal file
@ -0,0 +1,21 @@
|
||||
# mycoreapi.model.PanelMenuItem
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**label** | **String** | | [optional]
|
||||
**route** | **String** | | [optional]
|
||||
**icon** | **String** | | [optional]
|
||||
**color** | **String** | | [optional]
|
||||
**badgeValue** | **int** | | [optional]
|
||||
**badgeType** | **String** | | [optional]
|
||||
**children** | [**List<PanelMenuItem>**](PanelMenuItem.md) | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
19
mycore_api/doc/PanelSection.md
Normal file
19
mycore_api/doc/PanelSection.md
Normal file
@ -0,0 +1,19 @@
|
||||
# mycoreapi.model.PanelSection
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**label** | **String** | | [optional]
|
||||
**icon** | **String** | | [optional]
|
||||
**color** | **String** | | [optional]
|
||||
**defaultRoute** | **String** | | [optional]
|
||||
**children** | [**List<PanelMenuItem>**](PanelMenuItem.md) | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
24
mycore_api/doc/Provider.md
Normal file
24
mycore_api/doc/Provider.md
Normal file
@ -0,0 +1,24 @@
|
||||
# mycoreapi.model.Provider
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**userId** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**type** | **String** | | [optional]
|
||||
**username** | **String** | | [optional]
|
||||
**password** | **String** | | [optional]
|
||||
**endpoint** | **String** | | [optional]
|
||||
**apiKey** | **String** | | [optional]
|
||||
**value** | **String** | | [optional]
|
||||
**active** | **bool** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
189
mycore_api/doc/ProviderApi.md
Normal file
189
mycore_api/doc/ProviderApi.md
Normal file
@ -0,0 +1,189 @@
|
||||
# mycoreapi.api.ProviderApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://192.168.31.140*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**providerCreate**](ProviderApi.md#providercreate) | **POST** /api/provider | Create a provider
|
||||
[**providerDelete**](ProviderApi.md#providerdelete) | **DELETE** /api/provider/{providerId} | Delete a provider
|
||||
[**providerGetAll**](ProviderApi.md#providergetall) | **GET** /api/provider/{userId} | Get all user providers
|
||||
[**providerUpdate**](ProviderApi.md#providerupdate) | **PUT** /api/provider | Update a provider
|
||||
|
||||
|
||||
# **providerCreate**
|
||||
> ProviderDTO providerCreate(providerDTO)
|
||||
|
||||
Create a provider
|
||||
|
||||
### 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 = ProviderApi();
|
||||
final providerDTO = ProviderDTO(); // ProviderDTO | Provider to create
|
||||
|
||||
try {
|
||||
final result = api_instance.providerCreate(providerDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ProviderApi->providerCreate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**providerDTO** | [**ProviderDTO**](ProviderDTO.md)| Provider to create |
|
||||
|
||||
### Return type
|
||||
|
||||
[**ProviderDTO**](ProviderDTO.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)
|
||||
|
||||
# **providerDelete**
|
||||
> MultipartFile providerDelete(providerId)
|
||||
|
||||
Delete a provider
|
||||
|
||||
### 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 = ProviderApi();
|
||||
final providerId = providerId_example; // String | Id of provider to delete
|
||||
|
||||
try {
|
||||
final result = api_instance.providerDelete(providerId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ProviderApi->providerDelete: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**providerId** | **String**| Id of provider 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)
|
||||
|
||||
# **providerGetAll**
|
||||
> List<ProviderDTO> providerGetAll(userId)
|
||||
|
||||
Get all user providers
|
||||
|
||||
### 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 = ProviderApi();
|
||||
final userId = userId_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.providerGetAll(userId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ProviderApi->providerGetAll: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**userId** | **String**| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<ProviderDTO>**](ProviderDTO.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)
|
||||
|
||||
# **providerUpdate**
|
||||
> DeviceDetailDTO providerUpdate(providerDTO)
|
||||
|
||||
Update a provider
|
||||
|
||||
### 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 = ProviderApi();
|
||||
final providerDTO = ProviderDTO(); // ProviderDTO | Provider to update
|
||||
|
||||
try {
|
||||
final result = api_instance.providerUpdate(providerDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ProviderApi->providerUpdate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**providerDTO** | [**ProviderDTO**](ProviderDTO.md)| Provider to update |
|
||||
|
||||
### Return type
|
||||
|
||||
[**DeviceDetailDTO**](DeviceDetailDTO.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)
|
||||
|
||||
23
mycore_api/doc/ProviderDTO.md
Normal file
23
mycore_api/doc/ProviderDTO.md
Normal file
@ -0,0 +1,23 @@
|
||||
# mycoreapi.model.ProviderDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**type** | **String** | | [optional]
|
||||
**userId** | **String** | | [optional]
|
||||
**endpoint** | **String** | | [optional]
|
||||
**username** | **String** | | [optional]
|
||||
**password** | **String** | | [optional]
|
||||
**apiKey** | **String** | | [optional]
|
||||
**active** | **bool** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
325
mycore_api/doc/RoomApi.md
Normal file
325
mycore_api/doc/RoomApi.md
Normal file
@ -0,0 +1,325 @@
|
||||
# mycoreapi.api.RoomApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://192.168.31.140*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**roomCreate**](RoomApi.md#roomcreate) | **POST** /api/room | Create a room
|
||||
[**roomDelete**](RoomApi.md#roomdelete) | **DELETE** /api/room/{roomId}/device/{deviceId} | Delete device from a room
|
||||
[**roomDelete2**](RoomApi.md#roomdelete2) | **DELETE** /api/room/{roomId} | Delete a room
|
||||
[**roomDeleteAllForUser**](RoomApi.md#roomdeleteallforuser) | **DELETE** /api/room/user/{userId} | Delete all room for a specified
|
||||
[**roomGetAll**](RoomApi.md#roomgetall) | **GET** /api/room/{userId} | Get all rooms for the specified user
|
||||
[**roomGetDetail**](RoomApi.md#roomgetdetail) | **GET** /api/room/detail/{roomId} | Get detail info of a specified room
|
||||
[**roomUpdate**](RoomApi.md#roomupdate) | **PUT** /api/room | Update a room
|
||||
|
||||
|
||||
# **roomCreate**
|
||||
> RoomDetailDTO roomCreate(roomCreateOrUpdateDetailDTO)
|
||||
|
||||
Create a room
|
||||
|
||||
### 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 = RoomApi();
|
||||
final roomCreateOrUpdateDetailDTO = RoomCreateOrUpdateDetailDTO(); // RoomCreateOrUpdateDetailDTO | Room to create
|
||||
|
||||
try {
|
||||
final result = api_instance.roomCreate(roomCreateOrUpdateDetailDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling RoomApi->roomCreate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**roomCreateOrUpdateDetailDTO** | [**RoomCreateOrUpdateDetailDTO**](RoomCreateOrUpdateDetailDTO.md)| Room to create |
|
||||
|
||||
### Return type
|
||||
|
||||
[**RoomDetailDTO**](RoomDetailDTO.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)
|
||||
|
||||
# **roomDelete**
|
||||
> MultipartFile roomDelete(deviceId, roomId)
|
||||
|
||||
Delete device from a room
|
||||
|
||||
### 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 = RoomApi();
|
||||
final deviceId = deviceId_example; // String | Id of device to delete from the room
|
||||
final roomId = roomId_example; // String | Id of room
|
||||
|
||||
try {
|
||||
final result = api_instance.roomDelete(deviceId, roomId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling RoomApi->roomDelete: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**deviceId** | **String**| Id of device to delete from the room |
|
||||
**roomId** | **String**| Id of room |
|
||||
|
||||
### 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)
|
||||
|
||||
# **roomDelete2**
|
||||
> MultipartFile roomDelete2(roomId)
|
||||
|
||||
Delete a room
|
||||
|
||||
### 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 = RoomApi();
|
||||
final roomId = roomId_example; // String | Id of room
|
||||
|
||||
try {
|
||||
final result = api_instance.roomDelete2(roomId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling RoomApi->roomDelete2: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**roomId** | **String**| Id of room |
|
||||
|
||||
### 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)
|
||||
|
||||
# **roomDeleteAllForUser**
|
||||
> MultipartFile roomDeleteAllForUser(userId)
|
||||
|
||||
Delete all room 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 = RoomApi();
|
||||
final userId = userId_example; // String | Id of user
|
||||
|
||||
try {
|
||||
final result = api_instance.roomDeleteAllForUser(userId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling RoomApi->roomDeleteAllForUser: $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)
|
||||
|
||||
# **roomGetAll**
|
||||
> List<RoomSummaryDTO> roomGetAll(userId)
|
||||
|
||||
Get all rooms 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 = RoomApi();
|
||||
final userId = userId_example; // String | Id of user
|
||||
|
||||
try {
|
||||
final result = api_instance.roomGetAll(userId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling RoomApi->roomGetAll: $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)
|
||||
|
||||
# **roomGetDetail**
|
||||
> RoomDetailDTO roomGetDetail(roomId, userId)
|
||||
|
||||
Get detail info of a specified room
|
||||
|
||||
### 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 = RoomApi();
|
||||
final roomId = roomId_example; // String | room id
|
||||
final userId = userId_example; // String | user id
|
||||
|
||||
try {
|
||||
final result = api_instance.roomGetDetail(roomId, userId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling RoomApi->roomGetDetail: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**roomId** | **String**| room id |
|
||||
**userId** | **String**| user id | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**RoomDetailDTO**](RoomDetailDTO.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)
|
||||
|
||||
# **roomUpdate**
|
||||
> RoomCreateOrUpdateDetailDTO roomUpdate(roomCreateOrUpdateDetailDTO)
|
||||
|
||||
Update a room
|
||||
|
||||
### 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 = RoomApi();
|
||||
final roomCreateOrUpdateDetailDTO = RoomCreateOrUpdateDetailDTO(); // RoomCreateOrUpdateDetailDTO | room to update
|
||||
|
||||
try {
|
||||
final result = api_instance.roomUpdate(roomCreateOrUpdateDetailDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling RoomApi->roomUpdate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**roomCreateOrUpdateDetailDTO** | [**RoomCreateOrUpdateDetailDTO**](RoomCreateOrUpdateDetailDTO.md)| room to update |
|
||||
|
||||
### Return type
|
||||
|
||||
[**RoomCreateOrUpdateDetailDTO**](RoomCreateOrUpdateDetailDTO.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)
|
||||
|
||||
18
mycore_api/doc/RoomCreateOrUpdateDetailDTO.md
Normal file
18
mycore_api/doc/RoomCreateOrUpdateDetailDTO.md
Normal file
@ -0,0 +1,18 @@
|
||||
# mycoreapi.model.RoomCreateOrUpdateDetailDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**userId** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**deviceIds** | **List<String>** | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
20
mycore_api/doc/RoomDetailDTO.md
Normal file
20
mycore_api/doc/RoomDetailDTO.md
Normal file
@ -0,0 +1,20 @@
|
||||
# mycoreapi.model.RoomDetailDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**userId** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**createdDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**updatedDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**devices** | [**List<DeviceDetailDTO>**](DeviceDetailDTO.md) | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
17
mycore_api/doc/RoomSummaryDTO.md
Normal file
17
mycore_api/doc/RoomSummaryDTO.md
Normal file
@ -0,0 +1,17 @@
|
||||
# mycoreapi.model.RoomSummaryDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**userId** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
20
mycore_api/doc/ScreenConfiguration.md
Normal file
20
mycore_api/doc/ScreenConfiguration.md
Normal file
@ -0,0 +1,20 @@
|
||||
# mycoreapi.model.ScreenConfiguration
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**type** | **String** | | [optional]
|
||||
**widgets** | [**List<Widget>**](Widget.md) | | [optional] [default to const []]
|
||||
**height** | **int** | | [optional]
|
||||
**width** | **int** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
21
mycore_api/doc/ScreenDevice.md
Normal file
21
mycore_api/doc/ScreenDevice.md
Normal file
@ -0,0 +1,21 @@
|
||||
# mycoreapi.model.ScreenDevice
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**type** | **String** | | [optional]
|
||||
**location** | **String** | | [optional]
|
||||
**locationExplanation** | **String** | | [optional]
|
||||
**height** | **int** | | [optional]
|
||||
**width** | **int** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
231
mycore_api/doc/ScreenDeviceApi.md
Normal file
231
mycore_api/doc/ScreenDeviceApi.md
Normal file
@ -0,0 +1,231 @@
|
||||
# mycoreapi.api.ScreenDeviceApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://192.168.31.140*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**screenDeviceCreateDevice**](ScreenDeviceApi.md#screendevicecreatedevice) | **POST** /api/device/screen |
|
||||
[**screenDeviceDeleteDevice**](ScreenDeviceApi.md#screendevicedeletedevice) | **DELETE** /api/device/screen/{deviceId} |
|
||||
[**screenDeviceGetAllScreenDevices**](ScreenDeviceApi.md#screendevicegetallscreendevices) | **GET** /api/device/screen |
|
||||
[**screenDeviceGetDeviceInfo**](ScreenDeviceApi.md#screendevicegetdeviceinfo) | **GET** /api/device/screen/{screenDeviceId} |
|
||||
[**screenDeviceUpdateDevice**](ScreenDeviceApi.md#screendeviceupdatedevice) | **PUT** /api/device/screen/{screenDeviceId} |
|
||||
|
||||
|
||||
# **screenDeviceCreateDevice**
|
||||
> MultipartFile screenDeviceCreateDevice(screenDevice)
|
||||
|
||||
|
||||
|
||||
### 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 = ScreenDeviceApi();
|
||||
final screenDevice = ScreenDevice(); // ScreenDevice |
|
||||
|
||||
try {
|
||||
final result = api_instance.screenDeviceCreateDevice(screenDevice);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ScreenDeviceApi->screenDeviceCreateDevice: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**screenDevice** | [**ScreenDevice**](ScreenDevice.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**MultipartFile**](MultipartFile.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[bearer](../README.md#bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **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)
|
||||
|
||||
# **screenDeviceDeleteDevice**
|
||||
> MultipartFile screenDeviceDeleteDevice(deviceId)
|
||||
|
||||
|
||||
|
||||
### 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 = ScreenDeviceApi();
|
||||
final deviceId = deviceId_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.screenDeviceDeleteDevice(deviceId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ScreenDeviceApi->screenDeviceDeleteDevice: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**deviceId** | **String**| |
|
||||
|
||||
### 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)
|
||||
|
||||
# **screenDeviceGetAllScreenDevices**
|
||||
> List<ScreenDevice> screenDeviceGetAllScreenDevices()
|
||||
|
||||
|
||||
|
||||
### 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 = ScreenDeviceApi();
|
||||
|
||||
try {
|
||||
final result = api_instance.screenDeviceGetAllScreenDevices();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ScreenDeviceApi->screenDeviceGetAllScreenDevices: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<ScreenDevice>**](ScreenDevice.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)
|
||||
|
||||
# **screenDeviceGetDeviceInfo**
|
||||
> ScreenDevice screenDeviceGetDeviceInfo(screenDeviceId)
|
||||
|
||||
|
||||
|
||||
### 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 = ScreenDeviceApi();
|
||||
final screenDeviceId = screenDeviceId_example; // String | Id of the screen device you want to get information
|
||||
|
||||
try {
|
||||
final result = api_instance.screenDeviceGetDeviceInfo(screenDeviceId);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ScreenDeviceApi->screenDeviceGetDeviceInfo: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**screenDeviceId** | **String**| Id of the screen device you want to get information |
|
||||
|
||||
### Return type
|
||||
|
||||
[**ScreenDevice**](ScreenDevice.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)
|
||||
|
||||
# **screenDeviceUpdateDevice**
|
||||
> MultipartFile screenDeviceUpdateDevice(screenDeviceId, screenDevice)
|
||||
|
||||
|
||||
|
||||
### 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 = ScreenDeviceApi();
|
||||
final screenDeviceId = 56; // int |
|
||||
final screenDevice = ScreenDevice(); // ScreenDevice |
|
||||
|
||||
try {
|
||||
final result = api_instance.screenDeviceUpdateDevice(screenDeviceId, screenDevice);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ScreenDeviceApi->screenDeviceUpdateDevice: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**screenDeviceId** | **int**| |
|
||||
**screenDevice** | [**ScreenDevice**](ScreenDevice.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**MultipartFile**](MultipartFile.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[bearer](../README.md#bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **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)
|
||||
|
||||
22
mycore_api/doc/SmartGardenMessage.md
Normal file
22
mycore_api/doc/SmartGardenMessage.md
Normal file
@ -0,0 +1,22 @@
|
||||
# mycoreapi.model.SmartGardenMessage
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**type** | **String** | | [optional]
|
||||
**time** | **String** | | [optional]
|
||||
**temperature** | **double** | | [optional]
|
||||
**pressure** | **double** | | [optional]
|
||||
**humidity** | **double** | | [optional]
|
||||
**water** | **int** | | [optional]
|
||||
**light** | **int** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
20
mycore_api/doc/SmartPrinterMessage.md
Normal file
20
mycore_api/doc/SmartPrinterMessage.md
Normal file
@ -0,0 +1,20 @@
|
||||
# mycoreapi.model.SmartPrinterMessage
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**type** | **String** | | [optional]
|
||||
**time** | **String** | | [optional]
|
||||
**temperature** | **double** | | [optional]
|
||||
**pressure** | **double** | | [optional]
|
||||
**smoke** | **int** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
16
mycore_api/doc/State.md
Normal file
16
mycore_api/doc/State.md
Normal file
@ -0,0 +1,16 @@
|
||||
# mycoreapi.model.State
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | | [optional]
|
||||
**value** | **String** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
101
mycore_api/doc/TokenApi.md
Normal file
101
mycore_api/doc/TokenApi.md
Normal file
@ -0,0 +1,101 @@
|
||||
# mycoreapi.api.TokenApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://192.168.31.140*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**tokenConnectUser**](TokenApi.md#tokenconnectuser) | **POST** /api/token |
|
||||
[**tokenCreate**](TokenApi.md#tokencreate) | **POST** /token |
|
||||
|
||||
|
||||
# **tokenConnectUser**
|
||||
> UserInfo tokenConnectUser(loginDTO)
|
||||
|
||||
|
||||
|
||||
### 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 = TokenApi();
|
||||
final loginDTO = LoginDTO(); // LoginDTO |
|
||||
|
||||
try {
|
||||
final result = api_instance.tokenConnectUser(loginDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling TokenApi->tokenConnectUser: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**loginDTO** | [**LoginDTO**](LoginDTO.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**UserInfo**](UserInfo.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)
|
||||
|
||||
# **tokenCreate**
|
||||
> MultipartFile tokenCreate(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 = TokenApi();
|
||||
final user = User(); // User |
|
||||
|
||||
try {
|
||||
final result = api_instance.tokenCreate(user);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling TokenApi->tokenCreate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**User**](User.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**MultipartFile**](MultipartFile.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[bearer](../README.md#bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **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)
|
||||
|
||||
19
mycore_api/doc/Trigger.md
Normal file
19
mycore_api/doc/Trigger.md
Normal file
@ -0,0 +1,19 @@
|
||||
# mycoreapi.model.Trigger
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**providerId** | **String** | | [optional]
|
||||
**deviceId** | **String** | | [optional]
|
||||
**stateName** | **String** | | [optional]
|
||||
**stateValue** | **String** | | [optional]
|
||||
**type** | [**TriggerType**](TriggerType.md) | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
14
mycore_api/doc/TriggerType.md
Normal file
14
mycore_api/doc/TriggerType.md
Normal file
@ -0,0 +1,14 @@
|
||||
# mycoreapi.model.TriggerType
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
57
mycore_api/doc/TwitterApi.md
Normal file
57
mycore_api/doc/TwitterApi.md
Normal file
@ -0,0 +1,57 @@
|
||||
# mycoreapi.api.TwitterApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://192.168.31.140*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**twitterCreate**](TwitterApi.md#twittercreate) | **POST** /twitter |
|
||||
|
||||
|
||||
# **twitterCreate**
|
||||
> MultipartFile twitterCreate(twitterAuthModel)
|
||||
|
||||
|
||||
|
||||
### 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 = TwitterApi();
|
||||
final twitterAuthModel = TwitterAuthModel(); // TwitterAuthModel |
|
||||
|
||||
try {
|
||||
final result = api_instance.twitterCreate(twitterAuthModel);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling TwitterApi->twitterCreate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**twitterAuthModel** | [**TwitterAuthModel**](TwitterAuthModel.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**MultipartFile**](MultipartFile.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[bearer](../README.md#bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **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)
|
||||
|
||||
15
mycore_api/doc/TwitterAuthModel.md
Normal file
15
mycore_api/doc/TwitterAuthModel.md
Normal file
@ -0,0 +1,15 @@
|
||||
# mycoreapi.model.TwitterAuthModel
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**apiKey** | **String** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
16
mycore_api/doc/User.md
Normal file
16
mycore_api/doc/User.md
Normal file
@ -0,0 +1,16 @@
|
||||
# mycoreapi.model.User
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**password** | **String** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
229
mycore_api/doc/UserApi.md
Normal file
229
mycore_api/doc/UserApi.md
Normal file
@ -0,0 +1,229 @@
|
||||
# mycoreapi.api.UserApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://192.168.31.140*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**userCreateUser**](UserApi.md#usercreateuser) | **POST** /api/user |
|
||||
[**userDeleteUser**](UserApi.md#userdeleteuser) | **DELETE** /api/user/{id} |
|
||||
[**userGet**](UserApi.md#userget) | **GET** /api/user | Get a list of user
|
||||
[**userGet2**](UserApi.md#userget2) | **GET** /api/user/{id} | Get a specific user
|
||||
[**userUpdateUser**](UserApi.md#userupdateuser) | **PUT** /api/user |
|
||||
|
||||
|
||||
# **userCreateUser**
|
||||
> UserInfoDetailDTO userCreateUser(userInfo)
|
||||
|
||||
|
||||
|
||||
### 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 |
|
||||
|
||||
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)| |
|
||||
|
||||
### 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**
|
||||
> MultipartFile userDeleteUser(id)
|
||||
|
||||
|
||||
|
||||
### 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 |
|
||||
|
||||
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**| |
|
||||
|
||||
### 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)
|
||||
|
||||
# **userGet**
|
||||
> MultipartFile userGet()
|
||||
|
||||
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.userGet();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling UserApi->userGet: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### 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)
|
||||
|
||||
# **userGet2**
|
||||
> UserInfoDetailDTO userGet2(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.userGet2(id);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling UserApi->userGet2: $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)
|
||||
|
||||
# **userUpdateUser**
|
||||
> UserInfoDetailDTO userUpdateUser(userInfo)
|
||||
|
||||
|
||||
|
||||
### 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 |
|
||||
|
||||
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)| |
|
||||
|
||||
### 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)
|
||||
|
||||
36
mycore_api/doc/UserInfo.md
Normal file
36
mycore_api/doc/UserInfo.md
Normal file
@ -0,0 +1,36 @@
|
||||
# mycoreapi.model.UserInfo
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**role** | **String** | | [optional]
|
||||
**email** | **String** | | [optional]
|
||||
**password** | **String** | | [optional]
|
||||
**firstName** | **String** | | [optional]
|
||||
**lastName** | **String** | | [optional]
|
||||
**token** | **String** | | [optional]
|
||||
**birthday** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**address** | **String** | | [optional]
|
||||
**city** | **String** | | [optional]
|
||||
**state** | **String** | | [optional]
|
||||
**country** | **String** | | [optional]
|
||||
**language** | **String** | | [optional]
|
||||
**timeZone** | **String** | | [optional]
|
||||
**postalCode** | **int** | | [optional]
|
||||
**automations** | [**List<Automation>**](Automation.md) | | [optional] [default to const []]
|
||||
**devices** | [**List<Device>**](Device.md) | | [optional] [default to const []]
|
||||
**providers** | [**List<Provider>**](Provider.md) | | [optional] [default to const []]
|
||||
**groups** | [**List<Group>**](Group.md) | | [optional] [default to const []]
|
||||
**screenConfigurationIds** | [**List<ScreenConfiguration>**](ScreenConfiguration.md) | | [optional] [default to const []]
|
||||
**deviceIds** | [**List<ScreenDevice>**](ScreenDevice.md) | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
18
mycore_api/doc/UserInfoDetailDTO.md
Normal file
18
mycore_api/doc/UserInfoDetailDTO.md
Normal file
@ -0,0 +1,18 @@
|
||||
# mycoreapi.model.UserInfoDetailDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**email** | **String** | | [optional]
|
||||
**firstName** | **String** | | [optional]
|
||||
**lastName** | **String** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
228
mycore_api/doc/ValuesApi.md
Normal file
228
mycore_api/doc/ValuesApi.md
Normal file
@ -0,0 +1,228 @@
|
||||
# mycoreapi.api.ValuesApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://192.168.31.140*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**valuesDelete**](ValuesApi.md#valuesdelete) | **DELETE** /api/test/{id} |
|
||||
[**valuesGet**](ValuesApi.md#valuesget) | **GET** /api/test/{id} |
|
||||
[**valuesGetAll**](ValuesApi.md#valuesgetall) | **GET** /api/test | It's a test ! :)
|
||||
[**valuesPost**](ValuesApi.md#valuespost) | **POST** /api/test |
|
||||
[**valuesPut**](ValuesApi.md#valuesput) | **PUT** /api/test/{id} |
|
||||
|
||||
|
||||
# **valuesDelete**
|
||||
> valuesDelete(id)
|
||||
|
||||
|
||||
|
||||
### 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 = ValuesApi();
|
||||
final id = 56; // int |
|
||||
|
||||
try {
|
||||
api_instance.valuesDelete(id);
|
||||
} catch (e) {
|
||||
print('Exception when calling ValuesApi->valuesDelete: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **int**| |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[bearer](../README.md#bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[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)
|
||||
|
||||
# **valuesGet**
|
||||
> String valuesGet(id)
|
||||
|
||||
|
||||
|
||||
### 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 = ValuesApi();
|
||||
final id = 56; // int |
|
||||
|
||||
try {
|
||||
final result = api_instance.valuesGet(id);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ValuesApi->valuesGet: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **int**| |
|
||||
|
||||
### 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)
|
||||
|
||||
# **valuesGetAll**
|
||||
> List<String> valuesGetAll()
|
||||
|
||||
It's a test ! :)
|
||||
|
||||
### 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 = ValuesApi();
|
||||
|
||||
try {
|
||||
final result = api_instance.valuesGetAll();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ValuesApi->valuesGetAll: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
**List<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)
|
||||
|
||||
# **valuesPost**
|
||||
> valuesPost(body)
|
||||
|
||||
|
||||
|
||||
### 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 = ValuesApi();
|
||||
final body = String(); // String |
|
||||
|
||||
try {
|
||||
api_instance.valuesPost(body);
|
||||
} catch (e) {
|
||||
print('Exception when calling ValuesApi->valuesPost: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **String**| |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[bearer](../README.md#bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[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)
|
||||
|
||||
# **valuesPut**
|
||||
> valuesPut(id, body)
|
||||
|
||||
|
||||
|
||||
### 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 = ValuesApi();
|
||||
final id = 56; // int |
|
||||
final body = String(); // String |
|
||||
|
||||
try {
|
||||
api_instance.valuesPut(id, body);
|
||||
} catch (e) {
|
||||
print('Exception when calling ValuesApi->valuesPut: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **int**| |
|
||||
**body** | **String**| |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[bearer](../README.md#bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[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)
|
||||
|
||||
14
mycore_api/doc/ViewBy.md
Normal file
14
mycore_api/doc/ViewBy.md
Normal file
@ -0,0 +1,14 @@
|
||||
# mycoreapi.model.ViewBy
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
27
mycore_api/doc/Widget.md
Normal file
27
mycore_api/doc/Widget.md
Normal file
@ -0,0 +1,27 @@
|
||||
# mycoreapi.model.Widget
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:mycoreapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**displayName** | **String** | | [optional]
|
||||
**type** | **String** | | [optional]
|
||||
**activated** | **bool** | | [optional]
|
||||
**form** | **String** | | [optional]
|
||||
**font** | **String** | | [optional]
|
||||
**color** | **String** | | [optional]
|
||||
**size** | **String** | | [optional]
|
||||
**width** | **int** | | [optional]
|
||||
**height** | **int** | | [optional]
|
||||
**positionX** | **int** | | [optional]
|
||||
**positionY** | **int** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
58
mycore_api/git_push.sh
Normal file
58
mycore_api/git_push.sh
Normal file
@ -0,0 +1,58 @@
|
||||
#!/bin/sh
|
||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||
#
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
release_note=$3
|
||||
git_host=$4
|
||||
|
||||
if [ "$git_host" = "" ]; then
|
||||
git_host="github.com"
|
||||
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
||||
fi
|
||||
|
||||
if [ "$git_user_id" = "" ]; then
|
||||
git_user_id="GIT_USER_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||
fi
|
||||
|
||||
if [ "$git_repo_id" = "" ]; then
|
||||
git_repo_id="GIT_REPO_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||
fi
|
||||
|
||||
if [ "$release_note" = "" ]; then
|
||||
release_note="Minor update"
|
||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||
fi
|
||||
|
||||
# Initialize the local directory as a Git repository
|
||||
git init
|
||||
|
||||
# Adds the files in the local repository and stages them for commit.
|
||||
git add .
|
||||
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
git commit -m "$release_note"
|
||||
|
||||
# Sets the new remote
|
||||
git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
git pull origin master
|
||||
|
||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
||||
git push origin master 2>&1 | grep -v 'To https'
|
||||
|
||||
114
mycore_api/lib/api.dart
Normal file
114
mycore_api/lib/api.dart
Normal file
@ -0,0 +1,114 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.0
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
library openapi.api;
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:http/http.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
import 'package:meta/meta.dart';
|
||||
|
||||
part 'api_client.dart';
|
||||
part 'api_helper.dart';
|
||||
part 'api_exception.dart';
|
||||
part 'auth/authentication.dart';
|
||||
part 'auth/api_key_auth.dart';
|
||||
part 'auth/oauth.dart';
|
||||
part 'auth/http_basic_auth.dart';
|
||||
part 'auth/http_bearer_auth.dart';
|
||||
|
||||
part 'api/authentication_api.dart';
|
||||
part 'api/automation_api.dart';
|
||||
part 'api/azure_api.dart';
|
||||
part 'api/books_api.dart';
|
||||
part 'api/device_api.dart';
|
||||
part 'api/energy_api.dart';
|
||||
part 'api/facebook_api.dart';
|
||||
part 'api/google_api.dart';
|
||||
part 'api/group_api.dart';
|
||||
part 'api/iot_api.dart';
|
||||
part 'api/layout_api.dart';
|
||||
part 'api/mqtt_api.dart';
|
||||
part 'api/odd_api.dart';
|
||||
part 'api/provider_api.dart';
|
||||
part 'api/room_api.dart';
|
||||
part 'api/screen_device_api.dart';
|
||||
part 'api/token_api.dart';
|
||||
part 'api/twitter_api.dart';
|
||||
part 'api/user_api.dart';
|
||||
part 'api/values_api.dart';
|
||||
|
||||
part 'model/action.dart';
|
||||
part 'model/action_type.dart';
|
||||
part 'model/automation.dart';
|
||||
part 'model/automation_create_or_update_detail_dto.dart';
|
||||
part 'model/automation_create_or_update_detail_dto_all_of.dart';
|
||||
part 'model/automation_dto.dart';
|
||||
part 'model/automation_detail_dto.dart';
|
||||
part 'model/automation_detail_dto_all_of.dart';
|
||||
part 'model/azure_ad_auth_model.dart';
|
||||
part 'model/book.dart';
|
||||
part 'model/condition.dart';
|
||||
part 'model/condition_type.dart';
|
||||
part 'model/condition_value.dart';
|
||||
part 'model/connection_status.dart';
|
||||
part 'model/device.dart';
|
||||
part 'model/device_detail_dto.dart';
|
||||
part 'model/device_detail_dto_all_of.dart';
|
||||
part 'model/device_summary_dto.dart';
|
||||
part 'model/device_type.dart';
|
||||
part 'model/electricity_production.dart';
|
||||
part 'model/facebook_auth_model.dart';
|
||||
part 'model/google_auth_model.dart';
|
||||
part 'model/group.dart';
|
||||
part 'model/group_create_or_update_detail_dto.dart';
|
||||
part 'model/group_create_or_update_detail_dto_all_of.dart';
|
||||
part 'model/group_detail_dto.dart';
|
||||
part 'model/group_detail_dto_all_of.dart';
|
||||
part 'model/group_summary_dto.dart';
|
||||
part 'model/location_dto.dart';
|
||||
part 'model/login_dto.dart';
|
||||
part 'model/means_of_communication.dart';
|
||||
part 'model/mqtt_message_dto.dart';
|
||||
part 'model/odd_h2_h.dart';
|
||||
part 'model/odd_nice.dart';
|
||||
part 'model/panel_menu_item.dart';
|
||||
part 'model/panel_section.dart';
|
||||
part 'model/provider.dart';
|
||||
part 'model/provider_dto.dart';
|
||||
part 'model/room_create_or_update_detail_dto.dart';
|
||||
part 'model/room_detail_dto.dart';
|
||||
part 'model/room_summary_dto.dart';
|
||||
part 'model/screen_configuration.dart';
|
||||
part 'model/screen_device.dart';
|
||||
part 'model/smart_garden_message.dart';
|
||||
part 'model/smart_printer_message.dart';
|
||||
part 'model/state.dart';
|
||||
part 'model/trigger.dart';
|
||||
part 'model/trigger_type.dart';
|
||||
part 'model/twitter_auth_model.dart';
|
||||
part 'model/user.dart';
|
||||
part 'model/user_info.dart';
|
||||
part 'model/user_info_detail_dto.dart';
|
||||
part 'model/view_by.dart';
|
||||
part 'model/widget.dart';
|
||||
|
||||
|
||||
const _delimiters = {'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'};
|
||||
const _dateEpochMarker = 'epoch';
|
||||
final _dateFormatter = DateFormat('yyyy-MM-dd');
|
||||
final _regList = RegExp(r'^List<(.*)>$');
|
||||
final _regSet = RegExp(r'^Set<(.*)>$');
|
||||
final _regMap = RegExp(r'^Map<String,(.*)>$');
|
||||
|
||||
ApiClient defaultApiClient = ApiClient();
|
||||
203
mycore_api/lib/api/authentication_api.dart
Normal file
203
mycore_api/lib/api/authentication_api.dart
Normal file
@ -0,0 +1,203 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.0
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
|
||||
class AuthenticationApi {
|
||||
AuthenticationApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Authenticate with form parameters (used by Swagger test client)
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] grantType:
|
||||
///
|
||||
/// * [String] username:
|
||||
///
|
||||
/// * [String] password:
|
||||
///
|
||||
/// * [String] clientId:
|
||||
///
|
||||
/// * [String] clientSecret:
|
||||
Future<Response> authenticationAuthenticateWithFormWithHttpInfo({ String grantType, String username, String password, String clientId, String clientSecret }) async {
|
||||
// Verify required params are set.
|
||||
|
||||
final path = r'/api/Authentication/Token';
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['multipart/form-data'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (grantType != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'grant_type'] = parameterToString(grantType);
|
||||
}
|
||||
if (username != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'username'] = parameterToString(username);
|
||||
}
|
||||
if (password != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'password'] = parameterToString(password);
|
||||
}
|
||||
if (clientId != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'client_id'] = parameterToString(clientId);
|
||||
}
|
||||
if (clientSecret != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'client_secret'] = parameterToString(clientSecret);
|
||||
}
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
if (grantType != null) {
|
||||
formParams[r'grant_type'] = parameterToString(grantType);
|
||||
}
|
||||
if (username != null) {
|
||||
formParams[r'username'] = parameterToString(username);
|
||||
}
|
||||
if (password != null) {
|
||||
formParams[r'password'] = parameterToString(password);
|
||||
}
|
||||
if (clientId != null) {
|
||||
formParams[r'client_id'] = parameterToString(clientId);
|
||||
}
|
||||
if (clientSecret != null) {
|
||||
formParams[r'client_secret'] = parameterToString(clientSecret);
|
||||
}
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Authenticate with form parameters (used by Swagger test client)
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] grantType:
|
||||
///
|
||||
/// * [String] username:
|
||||
///
|
||||
/// * [String] password:
|
||||
///
|
||||
/// * [String] clientId:
|
||||
///
|
||||
/// * [String] clientSecret:
|
||||
Future<LoginDTO> authenticationAuthenticateWithForm({ String grantType, String username, String password, String clientId, String clientSecret }) async {
|
||||
final response = await authenticationAuthenticateWithFormWithHttpInfo( grantType: grantType, username: username, password: password, clientId: clientId, clientSecret: clientSecret );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'LoginDTO') as LoginDTO;
|
||||
}
|
||||
return Future<LoginDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Authenticate with Json parameters (used by most clients)
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [LoginDTO] loginDTO (required):
|
||||
/// Login DTO
|
||||
Future<Response> authenticationAuthenticateWithJsonWithHttpInfo(LoginDTO loginDTO) async {
|
||||
// Verify required params are set.
|
||||
if (loginDTO == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: loginDTO');
|
||||
}
|
||||
|
||||
final path = r'/api/Authentication/Authenticate';
|
||||
|
||||
Object postBody = loginDTO;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Authenticate with Json parameters (used by most clients)
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [LoginDTO] loginDTO (required):
|
||||
/// Login DTO
|
||||
Future<LoginDTO> authenticationAuthenticateWithJson(LoginDTO loginDTO) async {
|
||||
final response = await authenticationAuthenticateWithJsonWithHttpInfo(loginDTO);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'LoginDTO') as LoginDTO;
|
||||
}
|
||||
return Future<LoginDTO>.value(null);
|
||||
}
|
||||
}
|
||||
436
mycore_api/lib/api/automation_api.dart
Normal file
436
mycore_api/lib/api/automation_api.dart
Normal file
@ -0,0 +1,436 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.0
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
|
||||
class AutomationApi {
|
||||
AutomationApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Performs an HTTP 'POST /api/automation' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [AutomationCreateOrUpdateDetailDTO] automationCreateOrUpdateDetailDTO (required):
|
||||
Future<Response> automationCreateWithHttpInfo(AutomationCreateOrUpdateDetailDTO automationCreateOrUpdateDetailDTO) async {
|
||||
// Verify required params are set.
|
||||
if (automationCreateOrUpdateDetailDTO == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: automationCreateOrUpdateDetailDTO');
|
||||
}
|
||||
|
||||
final path = r'/api/automation';
|
||||
|
||||
Object postBody = automationCreateOrUpdateDetailDTO;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [AutomationCreateOrUpdateDetailDTO] automationCreateOrUpdateDetailDTO (required):
|
||||
Future<AutomationDTO> automationCreate(AutomationCreateOrUpdateDetailDTO automationCreateOrUpdateDetailDTO) async {
|
||||
final response = await automationCreateWithHttpInfo(automationCreateOrUpdateDetailDTO);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'AutomationDTO') as AutomationDTO;
|
||||
}
|
||||
return Future<AutomationDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Delete an automation
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] automationId (required):
|
||||
/// Id of automation to delete
|
||||
Future<Response> automationDeleteWithHttpInfo(String automationId) async {
|
||||
// Verify required params are set.
|
||||
if (automationId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: automationId');
|
||||
}
|
||||
|
||||
final path = r'/api/automation/{automationId}'
|
||||
.replaceAll('{' + 'automationId' + '}', automationId.toString());
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Delete an automation
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] automationId (required):
|
||||
/// Id of automation to delete
|
||||
Future<MultipartFile> automationDelete(String automationId) async {
|
||||
final response = await automationDeleteWithHttpInfo(automationId);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'MultipartFile') as MultipartFile;
|
||||
}
|
||||
return Future<MultipartFile>.value(null);
|
||||
}
|
||||
|
||||
/// Delete all automation for a specified
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// Id of user
|
||||
Future<Response> automationDeleteAllForUserWithHttpInfo(String userId) async {
|
||||
// Verify required params are set.
|
||||
if (userId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
|
||||
}
|
||||
|
||||
final path = r'/api/automation/user/{userId}'
|
||||
.replaceAll('{' + 'userId' + '}', userId.toString());
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Delete all automation for a specified
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// Id of user
|
||||
Future<MultipartFile> automationDeleteAllForUser(String userId) async {
|
||||
final response = await automationDeleteAllForUserWithHttpInfo(userId);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'MultipartFile') as MultipartFile;
|
||||
}
|
||||
return Future<MultipartFile>.value(null);
|
||||
}
|
||||
|
||||
/// Get all automations for the specified user
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// Id of user
|
||||
Future<Response> automationGetAllWithHttpInfo(String userId) async {
|
||||
// Verify required params are set.
|
||||
if (userId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
|
||||
}
|
||||
|
||||
final path = r'/api/automation/{userId}'
|
||||
.replaceAll('{' + 'userId' + '}', userId.toString());
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get all automations for the specified user
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// Id of user
|
||||
Future<List<RoomSummaryDTO>> automationGetAll(String userId) async {
|
||||
final response = await automationGetAllWithHttpInfo(userId);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return (apiClient.deserialize(_decodeBodyBytes(response), 'List<RoomSummaryDTO>') as List)
|
||||
.cast<RoomSummaryDTO>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<RoomSummaryDTO>>.value(null);
|
||||
}
|
||||
|
||||
/// Get detail info of a specified automation
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] automationId (required):
|
||||
/// automation id
|
||||
Future<Response> automationGetDetailWithHttpInfo(String automationId) async {
|
||||
// Verify required params are set.
|
||||
if (automationId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: automationId');
|
||||
}
|
||||
|
||||
final path = r'/api/automation/detail/{automationId}'
|
||||
.replaceAll('{' + 'automationId' + '}', automationId.toString());
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get detail info of a specified automation
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] automationId (required):
|
||||
/// automation id
|
||||
Future<AutomationDetailDTO> automationGetDetail(String automationId) async {
|
||||
final response = await automationGetDetailWithHttpInfo(automationId);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'AutomationDetailDTO') as AutomationDetailDTO;
|
||||
}
|
||||
return Future<AutomationDetailDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Update an automation
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [AutomationCreateOrUpdateDetailDTO] automationCreateOrUpdateDetailDTO (required):
|
||||
/// automation to update
|
||||
Future<Response> automationUpdateWithHttpInfo(AutomationCreateOrUpdateDetailDTO automationCreateOrUpdateDetailDTO) async {
|
||||
// Verify required params are set.
|
||||
if (automationCreateOrUpdateDetailDTO == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: automationCreateOrUpdateDetailDTO');
|
||||
}
|
||||
|
||||
final path = r'/api/automation';
|
||||
|
||||
Object postBody = automationCreateOrUpdateDetailDTO;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Update an automation
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [AutomationCreateOrUpdateDetailDTO] automationCreateOrUpdateDetailDTO (required):
|
||||
/// automation to update
|
||||
Future<AutomationCreateOrUpdateDetailDTO> automationUpdate(AutomationCreateOrUpdateDetailDTO automationCreateOrUpdateDetailDTO) async {
|
||||
final response = await automationUpdateWithHttpInfo(automationCreateOrUpdateDetailDTO);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'AutomationCreateOrUpdateDetailDTO') as AutomationCreateOrUpdateDetailDTO;
|
||||
}
|
||||
return Future<AutomationCreateOrUpdateDetailDTO>.value(null);
|
||||
}
|
||||
}
|
||||
80
mycore_api/lib/api/azure_api.dart
Normal file
80
mycore_api/lib/api/azure_api.dart
Normal file
@ -0,0 +1,80 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.0
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
|
||||
class AzureApi {
|
||||
AzureApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Performs an HTTP 'POST /azure' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [AzureADAuthModel] azureADAuthModel (required):
|
||||
Future<Response> azureCreateWithHttpInfo(AzureADAuthModel azureADAuthModel) async {
|
||||
// Verify required params are set.
|
||||
if (azureADAuthModel == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: azureADAuthModel');
|
||||
}
|
||||
|
||||
final path = r'/azure';
|
||||
|
||||
Object postBody = azureADAuthModel;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [AzureADAuthModel] azureADAuthModel (required):
|
||||
Future<MultipartFile> azureCreate(AzureADAuthModel azureADAuthModel) async {
|
||||
final response = await azureCreateWithHttpInfo(azureADAuthModel);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'MultipartFile') as MultipartFile;
|
||||
}
|
||||
return Future<MultipartFile>.value(null);
|
||||
}
|
||||
}
|
||||
333
mycore_api/lib/api/books_api.dart
Normal file
333
mycore_api/lib/api/books_api.dart
Normal file
@ -0,0 +1,333 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.0
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
|
||||
class BooksApi {
|
||||
BooksApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Performs an HTTP 'POST /api/books' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [Book] book (required):
|
||||
Future<Response> booksCreateWithHttpInfo(Book book) async {
|
||||
// Verify required params are set.
|
||||
if (book == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: book');
|
||||
}
|
||||
|
||||
final path = r'/api/books';
|
||||
|
||||
Object postBody = book;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [Book] book (required):
|
||||
Future<Book> booksCreate(Book book) async {
|
||||
final response = await booksCreateWithHttpInfo(book);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'Book') as Book;
|
||||
}
|
||||
return Future<Book>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'DELETE /api/books/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> booksDeleteWithHttpInfo(String id) async {
|
||||
// Verify required params are set.
|
||||
if (id == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: id');
|
||||
}
|
||||
|
||||
final path = r'/api/books/{id}'
|
||||
.replaceAll('{' + 'id' + '}', id.toString());
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<MultipartFile> booksDelete(String id) async {
|
||||
final response = await booksDeleteWithHttpInfo(id);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'MultipartFile') as MultipartFile;
|
||||
}
|
||||
return Future<MultipartFile>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/books/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> booksGetWithHttpInfo(String id) async {
|
||||
// Verify required params are set.
|
||||
if (id == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: id');
|
||||
}
|
||||
|
||||
final path = r'/api/books/{id}'
|
||||
.replaceAll('{' + 'id' + '}', id.toString());
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Book> booksGet(String id) async {
|
||||
final response = await booksGetWithHttpInfo(id);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'Book') as Book;
|
||||
}
|
||||
return Future<Book>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/books' operation and returns the [Response].
|
||||
Future<Response> booksGetAllWithHttpInfo() async {
|
||||
final path = r'/api/books';
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
Future<List<Book>> booksGetAll() async {
|
||||
final response = await booksGetAllWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return (apiClient.deserialize(_decodeBodyBytes(response), 'List<Book>') as List)
|
||||
.cast<Book>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<Book>>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'PUT /api/books/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [Book] book (required):
|
||||
Future<Response> booksUpdateWithHttpInfo(String id, Book book) async {
|
||||
// Verify required params are set.
|
||||
if (id == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: id');
|
||||
}
|
||||
if (book == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: book');
|
||||
}
|
||||
|
||||
final path = r'/api/books/{id}'
|
||||
.replaceAll('{' + 'id' + '}', id.toString());
|
||||
|
||||
Object postBody = book;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [Book] book (required):
|
||||
Future<MultipartFile> booksUpdate(String id, Book book) async {
|
||||
final response = await booksUpdateWithHttpInfo(id, book);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'MultipartFile') as MultipartFile;
|
||||
}
|
||||
return Future<MultipartFile>.value(null);
|
||||
}
|
||||
}
|
||||
854
mycore_api/lib/api/device_api.dart
Normal file
854
mycore_api/lib/api/device_api.dart
Normal file
@ -0,0 +1,854 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.0
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
|
||||
class DeviceApi {
|
||||
DeviceApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Create a device
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [DeviceDetailDTO] deviceDetailDTO (required):
|
||||
/// Device to create
|
||||
Future<Response> deviceCreateWithHttpInfo(DeviceDetailDTO deviceDetailDTO) async {
|
||||
// Verify required params are set.
|
||||
if (deviceDetailDTO == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: deviceDetailDTO');
|
||||
}
|
||||
|
||||
final path = r'/api/device';
|
||||
|
||||
Object postBody = deviceDetailDTO;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a device
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [DeviceDetailDTO] deviceDetailDTO (required):
|
||||
/// Device to create
|
||||
Future<DeviceDetailDTO> deviceCreate(DeviceDetailDTO deviceDetailDTO) async {
|
||||
final response = await deviceCreateWithHttpInfo(deviceDetailDTO);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'DeviceDetailDTO') as DeviceDetailDTO;
|
||||
}
|
||||
return Future<DeviceDetailDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Create devices from provider
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// User Id
|
||||
///
|
||||
/// * [String] providerId (required):
|
||||
/// Id of Provider
|
||||
Future<Response> deviceCreateDevicesFromProviderWithHttpInfo(String userId, String providerId) async {
|
||||
// Verify required params are set.
|
||||
if (userId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
|
||||
}
|
||||
if (providerId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: providerId');
|
||||
}
|
||||
|
||||
final path = r'/api/device/{userId}/fromProvider/{providerId}'
|
||||
.replaceAll('{' + 'userId' + '}', userId.toString())
|
||||
.replaceAll('{' + 'providerId' + '}', providerId.toString());
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create devices from provider
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// User Id
|
||||
///
|
||||
/// * [String] providerId (required):
|
||||
/// Id of Provider
|
||||
Future<List<DeviceDetailDTO>> deviceCreateDevicesFromProvider(String userId, String providerId) async {
|
||||
final response = await deviceCreateDevicesFromProviderWithHttpInfo(userId, providerId);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return (apiClient.deserialize(_decodeBodyBytes(response), 'List<DeviceDetailDTO>') as List)
|
||||
.cast<DeviceDetailDTO>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<DeviceDetailDTO>>.value(null);
|
||||
}
|
||||
|
||||
/// Delete a device
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] deviceId (required):
|
||||
/// Id of device to delete
|
||||
Future<Response> deviceDeleteWithHttpInfo(String deviceId) async {
|
||||
// Verify required params are set.
|
||||
if (deviceId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: deviceId');
|
||||
}
|
||||
|
||||
final path = r'/api/device/{deviceId}'
|
||||
.replaceAll('{' + 'deviceId' + '}', deviceId.toString());
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Delete a device
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] deviceId (required):
|
||||
/// Id of device to delete
|
||||
Future<MultipartFile> deviceDelete(String deviceId) async {
|
||||
final response = await deviceDeleteWithHttpInfo(deviceId);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'MultipartFile') as MultipartFile;
|
||||
}
|
||||
return Future<MultipartFile>.value(null);
|
||||
}
|
||||
|
||||
/// Delete all device for a specified
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// Id of user
|
||||
Future<Response> deviceDeleteAllForUserWithHttpInfo(String userId) async {
|
||||
// Verify required params are set.
|
||||
if (userId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
|
||||
}
|
||||
|
||||
final path = r'/api/device/user/{userId}'
|
||||
.replaceAll('{' + 'userId' + '}', userId.toString());
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Delete all device for a specified
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// Id of user
|
||||
Future<MultipartFile> deviceDeleteAllForUser(String userId) async {
|
||||
final response = await deviceDeleteAllForUserWithHttpInfo(userId);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'MultipartFile') as MultipartFile;
|
||||
}
|
||||
return Future<MultipartFile>.value(null);
|
||||
}
|
||||
|
||||
/// Delete devices from provider
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// User Id
|
||||
///
|
||||
/// * [String] providerId (required):
|
||||
/// Id of Provider
|
||||
Future<Response> deviceDeleteDevicesFromProviderWithHttpInfo(String userId, String providerId) async {
|
||||
// Verify required params are set.
|
||||
if (userId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
|
||||
}
|
||||
if (providerId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: providerId');
|
||||
}
|
||||
|
||||
final path = r'/api/device/{userId}/fromProvider/{providerId}'
|
||||
.replaceAll('{' + 'userId' + '}', userId.toString())
|
||||
.replaceAll('{' + 'providerId' + '}', providerId.toString());
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Delete devices from provider
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// User Id
|
||||
///
|
||||
/// * [String] providerId (required):
|
||||
/// Id of Provider
|
||||
Future<MultipartFile> deviceDeleteDevicesFromProvider(String userId, String providerId) async {
|
||||
final response = await deviceDeleteDevicesFromProviderWithHttpInfo(userId, providerId);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'MultipartFile') as MultipartFile;
|
||||
}
|
||||
return Future<MultipartFile>.value(null);
|
||||
}
|
||||
|
||||
/// Get all devices summary
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// Id of user
|
||||
Future<Response> deviceGetAllWithHttpInfo(String userId) async {
|
||||
// Verify required params are set.
|
||||
if (userId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
|
||||
}
|
||||
|
||||
final path = r'/api/device/{userId}'
|
||||
.replaceAll('{' + 'userId' + '}', userId.toString());
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get all devices summary
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// Id of user
|
||||
Future<List<DeviceSummaryDTO>> deviceGetAll(String userId) async {
|
||||
final response = await deviceGetAllWithHttpInfo(userId);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return (apiClient.deserialize(_decodeBodyBytes(response), 'List<DeviceSummaryDTO>') as List)
|
||||
.cast<DeviceSummaryDTO>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<DeviceSummaryDTO>>.value(null);
|
||||
}
|
||||
|
||||
/// Get a specific device info
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] deviceId (required):
|
||||
/// id of device
|
||||
Future<Response> deviceGetDetailWithHttpInfo(String deviceId) async {
|
||||
// Verify required params are set.
|
||||
if (deviceId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: deviceId');
|
||||
}
|
||||
|
||||
final path = r'/api/device/detail/{deviceId}'
|
||||
.replaceAll('{' + 'deviceId' + '}', deviceId.toString());
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get a specific device info
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] deviceId (required):
|
||||
/// id of device
|
||||
Future<DeviceDetailDTO> deviceGetDetail(String deviceId) async {
|
||||
final response = await deviceGetDetailWithHttpInfo(deviceId);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'DeviceDetailDTO') as DeviceDetailDTO;
|
||||
}
|
||||
return Future<DeviceDetailDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Get list of devices from a type
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// user Id
|
||||
///
|
||||
/// * [DeviceType] type (required):
|
||||
/// device type
|
||||
Future<Response> deviceGetDevicesByTypeWithHttpInfo(String userId, DeviceType type) async {
|
||||
// Verify required params are set.
|
||||
if (userId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
|
||||
}
|
||||
if (type == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: type');
|
||||
}
|
||||
|
||||
final path = r'/api/device/{userId}/type/{type}'
|
||||
.replaceAll('{' + 'userId' + '}', userId.toString())
|
||||
.replaceAll('{' + 'type' + '}', type.toString());
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get list of devices from a type
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// user Id
|
||||
///
|
||||
/// * [DeviceType] type (required):
|
||||
/// device type
|
||||
Future<List<DeviceDetailDTO>> deviceGetDevicesByType(String userId, DeviceType type) async {
|
||||
final response = await deviceGetDevicesByTypeWithHttpInfo(userId, type);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return (apiClient.deserialize(_decodeBodyBytes(response), 'List<DeviceDetailDTO>') as List)
|
||||
.cast<DeviceDetailDTO>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<DeviceDetailDTO>>.value(null);
|
||||
}
|
||||
|
||||
/// Get devices from provider
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// User Id
|
||||
///
|
||||
/// * [String] providerId (required):
|
||||
/// Id of Provider
|
||||
Future<Response> deviceGetDevicesFromProviderWithHttpInfo(String userId, String providerId) async {
|
||||
// Verify required params are set.
|
||||
if (userId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
|
||||
}
|
||||
if (providerId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: providerId');
|
||||
}
|
||||
|
||||
final path = r'/api/device/{userId}/fromProvider/{providerId}'
|
||||
.replaceAll('{' + 'userId' + '}', userId.toString())
|
||||
.replaceAll('{' + 'providerId' + '}', providerId.toString());
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get devices from provider
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// User Id
|
||||
///
|
||||
/// * [String] providerId (required):
|
||||
/// Id of Provider
|
||||
Future<List<DeviceDetailDTO>> deviceGetDevicesFromProvider(String userId, String providerId) async {
|
||||
final response = await deviceGetDevicesFromProviderWithHttpInfo(userId, providerId);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return (apiClient.deserialize(_decodeBodyBytes(response), 'List<DeviceDetailDTO>') as List)
|
||||
.cast<DeviceDetailDTO>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<DeviceDetailDTO>>.value(null);
|
||||
}
|
||||
|
||||
/// Get all zigbee2Mqtt devices
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// User Id
|
||||
Future<Response> deviceGetDevicesFromZigbee2MqttWithHttpInfo(String userId) async {
|
||||
// Verify required params are set.
|
||||
if (userId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
|
||||
}
|
||||
|
||||
final path = r'/api/device/zigbee2Mqtt/{userId}'
|
||||
.replaceAll('{' + 'userId' + '}', userId.toString());
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get all zigbee2Mqtt devices
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// User Id
|
||||
Future<List<DeviceDetailDTO>> deviceGetDevicesFromZigbee2Mqtt(String userId) async {
|
||||
final response = await deviceGetDevicesFromZigbee2MqttWithHttpInfo(userId);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return (apiClient.deserialize(_decodeBodyBytes(response), 'List<DeviceDetailDTO>') as List)
|
||||
.cast<DeviceDetailDTO>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<DeviceDetailDTO>>.value(null);
|
||||
}
|
||||
|
||||
/// Update a device
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] deviceId (required):
|
||||
///
|
||||
/// * [DeviceDetailDTO] deviceDetailDTO (required):
|
||||
/// Device to update
|
||||
Future<Response> deviceUpdateWithHttpInfo(String deviceId, DeviceDetailDTO deviceDetailDTO) async {
|
||||
// Verify required params are set.
|
||||
if (deviceId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: deviceId');
|
||||
}
|
||||
if (deviceDetailDTO == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: deviceDetailDTO');
|
||||
}
|
||||
|
||||
final path = r'/api/device/{deviceId}'
|
||||
.replaceAll('{' + 'deviceId' + '}', deviceId.toString());
|
||||
|
||||
Object postBody = deviceDetailDTO;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Update a device
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] deviceId (required):
|
||||
///
|
||||
/// * [DeviceDetailDTO] deviceDetailDTO (required):
|
||||
/// Device to update
|
||||
Future<DeviceDetailDTO> deviceUpdate(String deviceId, DeviceDetailDTO deviceDetailDTO) async {
|
||||
final response = await deviceUpdateWithHttpInfo(deviceId, deviceDetailDTO);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'DeviceDetailDTO') as DeviceDetailDTO;
|
||||
}
|
||||
return Future<DeviceDetailDTO>.value(null);
|
||||
}
|
||||
}
|
||||
95
mycore_api/lib/api/energy_api.dart
Normal file
95
mycore_api/lib/api/energy_api.dart
Normal file
@ -0,0 +1,95 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.0
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
|
||||
class EnergyApi {
|
||||
EnergyApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Get summary production of Kwh/Year
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId:
|
||||
///
|
||||
/// * [ViewBy] viewBy:
|
||||
Future<Response> energyGetElectricityProductionWithHttpInfo({ String userId, ViewBy viewBy }) async {
|
||||
// Verify required params are set.
|
||||
|
||||
final path = r'/api/energy/electricity';
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (userId != null) {
|
||||
queryParams.addAll(_convertParametersForCollectionFormat('', 'userId', userId));
|
||||
}
|
||||
if (viewBy != null) {
|
||||
queryParams.addAll(_convertParametersForCollectionFormat('', 'viewBy', viewBy));
|
||||
}
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get summary production of Kwh/Year
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId:
|
||||
///
|
||||
/// * [ViewBy] viewBy:
|
||||
Future<List<ElectricityProduction>> energyGetElectricityProduction({ String userId, ViewBy viewBy }) async {
|
||||
final response = await energyGetElectricityProductionWithHttpInfo( userId: userId, viewBy: viewBy );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return (apiClient.deserialize(_decodeBodyBytes(response), 'List<ElectricityProduction>') as List)
|
||||
.cast<ElectricityProduction>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<ElectricityProduction>>.value(null);
|
||||
}
|
||||
}
|
||||
80
mycore_api/lib/api/facebook_api.dart
Normal file
80
mycore_api/lib/api/facebook_api.dart
Normal file
@ -0,0 +1,80 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.0
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
|
||||
class FacebookApi {
|
||||
FacebookApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Performs an HTTP 'POST /facebook' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [FacebookAuthModel] facebookAuthModel (required):
|
||||
Future<Response> facebookCreateWithHttpInfo(FacebookAuthModel facebookAuthModel) async {
|
||||
// Verify required params are set.
|
||||
if (facebookAuthModel == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: facebookAuthModel');
|
||||
}
|
||||
|
||||
final path = r'/facebook';
|
||||
|
||||
Object postBody = facebookAuthModel;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [FacebookAuthModel] facebookAuthModel (required):
|
||||
Future<MultipartFile> facebookCreate(FacebookAuthModel facebookAuthModel) async {
|
||||
final response = await facebookCreateWithHttpInfo(facebookAuthModel);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'MultipartFile') as MultipartFile;
|
||||
}
|
||||
return Future<MultipartFile>.value(null);
|
||||
}
|
||||
}
|
||||
80
mycore_api/lib/api/google_api.dart
Normal file
80
mycore_api/lib/api/google_api.dart
Normal file
@ -0,0 +1,80 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.0
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
|
||||
class GoogleApi {
|
||||
GoogleApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Performs an HTTP 'POST /google' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [GoogleAuthModel] googleAuthModel (required):
|
||||
Future<Response> googleCreateWithHttpInfo(GoogleAuthModel googleAuthModel) async {
|
||||
// Verify required params are set.
|
||||
if (googleAuthModel == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: googleAuthModel');
|
||||
}
|
||||
|
||||
final path = r'/google';
|
||||
|
||||
Object postBody = googleAuthModel;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [GoogleAuthModel] googleAuthModel (required):
|
||||
Future<MultipartFile> googleCreate(GoogleAuthModel googleAuthModel) async {
|
||||
final response = await googleCreateWithHttpInfo(googleAuthModel);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'MultipartFile') as MultipartFile;
|
||||
}
|
||||
return Future<MultipartFile>.value(null);
|
||||
}
|
||||
}
|
||||
763
mycore_api/lib/api/group_api.dart
Normal file
763
mycore_api/lib/api/group_api.dart
Normal file
@ -0,0 +1,763 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.0
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
|
||||
class GroupApi {
|
||||
GroupApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Create a group
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [GroupCreateOrUpdateDetailDTO] groupCreateOrUpdateDetailDTO (required):
|
||||
/// Group to create
|
||||
Future<Response> groupCreateWithHttpInfo(GroupCreateOrUpdateDetailDTO groupCreateOrUpdateDetailDTO) async {
|
||||
// Verify required params are set.
|
||||
if (groupCreateOrUpdateDetailDTO == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: groupCreateOrUpdateDetailDTO');
|
||||
}
|
||||
|
||||
final path = r'/api/group';
|
||||
|
||||
Object postBody = groupCreateOrUpdateDetailDTO;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a group
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [GroupCreateOrUpdateDetailDTO] groupCreateOrUpdateDetailDTO (required):
|
||||
/// Group to create
|
||||
Future<GroupDetailDTO> groupCreate(GroupCreateOrUpdateDetailDTO groupCreateOrUpdateDetailDTO) async {
|
||||
final response = await groupCreateWithHttpInfo(groupCreateOrUpdateDetailDTO);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'GroupDetailDTO') as GroupDetailDTO;
|
||||
}
|
||||
return Future<GroupDetailDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Create groups from provider
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// User Id
|
||||
Future<Response> groupCreateDevicesFromZigbee2MqttWithHttpInfo(String userId) async {
|
||||
// Verify required params are set.
|
||||
if (userId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
|
||||
}
|
||||
|
||||
final path = r'/api/group/{userId}/fromZigbee'
|
||||
.replaceAll('{' + 'userId' + '}', userId.toString());
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create groups from provider
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// User Id
|
||||
Future<List<GroupDetailDTO>> groupCreateDevicesFromZigbee2Mqtt(String userId) async {
|
||||
final response = await groupCreateDevicesFromZigbee2MqttWithHttpInfo(userId);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return (apiClient.deserialize(_decodeBodyBytes(response), 'List<GroupDetailDTO>') as List)
|
||||
.cast<GroupDetailDTO>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<GroupDetailDTO>>.value(null);
|
||||
}
|
||||
|
||||
/// Delete device from a group
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] deviceId (required):
|
||||
/// Id of device to delete from the group
|
||||
///
|
||||
/// * [String] groupId (required):
|
||||
/// Id of group
|
||||
Future<Response> groupDeleteWithHttpInfo(String deviceId, String groupId) async {
|
||||
// Verify required params are set.
|
||||
if (deviceId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: deviceId');
|
||||
}
|
||||
if (groupId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: groupId');
|
||||
}
|
||||
|
||||
final path = r'/api/group/{groupId}/device/{deviceId}'
|
||||
.replaceAll('{' + 'deviceId' + '}', deviceId.toString())
|
||||
.replaceAll('{' + 'groupId' + '}', groupId.toString());
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Delete device from a group
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] deviceId (required):
|
||||
/// Id of device to delete from the group
|
||||
///
|
||||
/// * [String] groupId (required):
|
||||
/// Id of group
|
||||
Future<MultipartFile> groupDelete(String deviceId, String groupId) async {
|
||||
final response = await groupDeleteWithHttpInfo(deviceId, groupId);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'MultipartFile') as MultipartFile;
|
||||
}
|
||||
return Future<MultipartFile>.value(null);
|
||||
}
|
||||
|
||||
/// Delete a group
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] groupId (required):
|
||||
/// Id of group
|
||||
Future<Response> groupDelete2WithHttpInfo(String groupId) async {
|
||||
// Verify required params are set.
|
||||
if (groupId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: groupId');
|
||||
}
|
||||
|
||||
final path = r'/api/group/{groupId}'
|
||||
.replaceAll('{' + 'groupId' + '}', groupId.toString());
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Delete a group
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] groupId (required):
|
||||
/// Id of group
|
||||
Future<MultipartFile> groupDelete2(String groupId) async {
|
||||
final response = await groupDelete2WithHttpInfo(groupId);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'MultipartFile') as MultipartFile;
|
||||
}
|
||||
return Future<MultipartFile>.value(null);
|
||||
}
|
||||
|
||||
/// Delete all group for a specified
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// Id of user
|
||||
Future<Response> groupDeleteAllForUserWithHttpInfo(String userId) async {
|
||||
// Verify required params are set.
|
||||
if (userId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
|
||||
}
|
||||
|
||||
final path = r'/api/group/user/{userId}'
|
||||
.replaceAll('{' + 'userId' + '}', userId.toString());
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Delete all group for a specified
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// Id of user
|
||||
Future<MultipartFile> groupDeleteAllForUser(String userId) async {
|
||||
final response = await groupDeleteAllForUserWithHttpInfo(userId);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'MultipartFile') as MultipartFile;
|
||||
}
|
||||
return Future<MultipartFile>.value(null);
|
||||
}
|
||||
|
||||
/// Get all groups for the specified user
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// Id of user
|
||||
Future<Response> groupGetAllWithHttpInfo(String userId) async {
|
||||
// Verify required params are set.
|
||||
if (userId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
|
||||
}
|
||||
|
||||
final path = r'/api/group/{userId}'
|
||||
.replaceAll('{' + 'userId' + '}', userId.toString());
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get all groups for the specified user
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// Id of user
|
||||
Future<List<GroupSummaryDTO>> groupGetAll(String userId) async {
|
||||
final response = await groupGetAllWithHttpInfo(userId);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return (apiClient.deserialize(_decodeBodyBytes(response), 'List<GroupSummaryDTO>') as List)
|
||||
.cast<GroupSummaryDTO>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<GroupSummaryDTO>>.value(null);
|
||||
}
|
||||
|
||||
/// Get detail info of a specified group
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] groupId (required):
|
||||
/// groupid
|
||||
///
|
||||
/// * [String] userId:
|
||||
/// user id
|
||||
Future<Response> groupGetDetailWithHttpInfo(String groupId, { String userId }) async {
|
||||
// Verify required params are set.
|
||||
if (groupId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: groupId');
|
||||
}
|
||||
|
||||
final path = r'/api/group/detail/{groupId}'
|
||||
.replaceAll('{' + 'groupId' + '}', groupId.toString());
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (userId != null) {
|
||||
queryParams.addAll(_convertParametersForCollectionFormat('', 'userId', userId));
|
||||
}
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get detail info of a specified group
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] groupId (required):
|
||||
/// groupid
|
||||
///
|
||||
/// * [String] userId:
|
||||
/// user id
|
||||
Future<GroupDetailDTO> groupGetDetail(String groupId, { String userId }) async {
|
||||
final response = await groupGetDetailWithHttpInfo(groupId, userId: userId );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'GroupDetailDTO') as GroupDetailDTO;
|
||||
}
|
||||
return Future<GroupDetailDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Get list of group from a type
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// user Id
|
||||
///
|
||||
/// * [String] type (required):
|
||||
/// group type
|
||||
Future<Response> groupGetGroupsByTypeWithHttpInfo(String userId, String type) async {
|
||||
// Verify required params are set.
|
||||
if (userId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
|
||||
}
|
||||
if (type == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: type');
|
||||
}
|
||||
|
||||
final path = r'/api/group/{userId}/type/{type}'
|
||||
.replaceAll('{' + 'userId' + '}', userId.toString())
|
||||
.replaceAll('{' + 'type' + '}', type.toString());
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get list of group from a type
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// user Id
|
||||
///
|
||||
/// * [String] type (required):
|
||||
/// group type
|
||||
Future<List<GroupSummaryDTO>> groupGetGroupsByType(String userId, String type) async {
|
||||
final response = await groupGetGroupsByTypeWithHttpInfo(userId, type);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return (apiClient.deserialize(_decodeBodyBytes(response), 'List<GroupSummaryDTO>') as List)
|
||||
.cast<GroupSummaryDTO>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<GroupSummaryDTO>>.value(null);
|
||||
}
|
||||
|
||||
/// Get all zigbee2Mqtt groups
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// User Id
|
||||
Future<Response> groupGetGroupsFromZigbee2MqttWithHttpInfo(String userId) async {
|
||||
// Verify required params are set.
|
||||
if (userId == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
|
||||
}
|
||||
|
||||
final path = r'/api/group/zigbee2Mqtt/{userId}'
|
||||
.replaceAll('{' + 'userId' + '}', userId.toString());
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get all zigbee2Mqtt groups
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
/// User Id
|
||||
Future<List<GroupDetailDTO>> groupGetGroupsFromZigbee2Mqtt(String userId) async {
|
||||
final response = await groupGetGroupsFromZigbee2MqttWithHttpInfo(userId);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return (apiClient.deserialize(_decodeBodyBytes(response), 'List<GroupDetailDTO>') as List)
|
||||
.cast<GroupDetailDTO>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<GroupDetailDTO>>.value(null);
|
||||
}
|
||||
|
||||
/// Update a group
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [GroupCreateOrUpdateDetailDTO] groupCreateOrUpdateDetailDTO (required):
|
||||
/// group to update
|
||||
Future<Response> groupUpdateWithHttpInfo(GroupCreateOrUpdateDetailDTO groupCreateOrUpdateDetailDTO) async {
|
||||
// Verify required params are set.
|
||||
if (groupCreateOrUpdateDetailDTO == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: groupCreateOrUpdateDetailDTO');
|
||||
}
|
||||
|
||||
final path = r'/api/group';
|
||||
|
||||
Object postBody = groupCreateOrUpdateDetailDTO;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Update a group
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [GroupCreateOrUpdateDetailDTO] groupCreateOrUpdateDetailDTO (required):
|
||||
/// group to update
|
||||
Future<GroupCreateOrUpdateDetailDTO> groupUpdate(GroupCreateOrUpdateDetailDTO groupCreateOrUpdateDetailDTO) async {
|
||||
final response = await groupUpdateWithHttpInfo(groupCreateOrUpdateDetailDTO);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'GroupCreateOrUpdateDetailDTO') as GroupCreateOrUpdateDetailDTO;
|
||||
}
|
||||
return Future<GroupCreateOrUpdateDetailDTO>.value(null);
|
||||
}
|
||||
}
|
||||
254
mycore_api/lib/api/iot_api.dart
Normal file
254
mycore_api/lib/api/iot_api.dart
Normal file
@ -0,0 +1,254 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.0
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
|
||||
class IOTApi {
|
||||
IOTApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Retrieve all SmartPrinterMessage
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] idDevice (required):
|
||||
///
|
||||
/// * [int] id:
|
||||
/// Id of the smart printer message
|
||||
Future<Response> iOTGetSmartPrinterMessagesWithHttpInfo(String idDevice, { int id }) async {
|
||||
// Verify required params are set.
|
||||
if (idDevice == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: idDevice');
|
||||
}
|
||||
|
||||
final path = r'/api/iot/smartprinter/{idDevice}'
|
||||
.replaceAll('{' + 'idDevice' + '}', idDevice.toString());
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (id != null) {
|
||||
queryParams.addAll(_convertParametersForCollectionFormat('', 'id', id));
|
||||
}
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve all SmartPrinterMessage
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] idDevice (required):
|
||||
///
|
||||
/// * [int] id:
|
||||
/// Id of the smart printer message
|
||||
Future<List<SmartPrinterMessage>> iOTGetSmartPrinterMessages(String idDevice, { int id }) async {
|
||||
final response = await iOTGetSmartPrinterMessagesWithHttpInfo(idDevice, id: id );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return (apiClient.deserialize(_decodeBodyBytes(response), 'List<SmartPrinterMessage>') as List)
|
||||
.cast<SmartPrinterMessage>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<SmartPrinterMessage>>.value(null);
|
||||
}
|
||||
|
||||
/// It's the method to post data from mqtt broker to Database (Thanks Rpi!)
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [int] idDevice (required):
|
||||
/// Id of the device to upload to DB
|
||||
///
|
||||
/// * [List<SmartPrinterMessage>] smartPrinterMessage (required):
|
||||
/// Content that will be uploaded
|
||||
Future<Response> iOTPostToDBPrinterWithHttpInfo(int idDevice, List<SmartPrinterMessage> smartPrinterMessage) async {
|
||||
// Verify required params are set.
|
||||
if (idDevice == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: idDevice');
|
||||
}
|
||||
if (smartPrinterMessage == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: smartPrinterMessage');
|
||||
}
|
||||
|
||||
final path = r'/api/iot/smartprinter/{idDevice}'
|
||||
.replaceAll('{' + 'idDevice' + '}', idDevice.toString());
|
||||
|
||||
Object postBody = smartPrinterMessage;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// It's the method to post data from mqtt broker to Database (Thanks Rpi!)
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [int] idDevice (required):
|
||||
/// Id of the device to upload to DB
|
||||
///
|
||||
/// * [List<SmartPrinterMessage>] smartPrinterMessage (required):
|
||||
/// Content that will be uploaded
|
||||
Future<MultipartFile> iOTPostToDBPrinter(int idDevice, List<SmartPrinterMessage> smartPrinterMessage) async {
|
||||
final response = await iOTPostToDBPrinterWithHttpInfo(idDevice, smartPrinterMessage);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'MultipartFile') as MultipartFile;
|
||||
}
|
||||
return Future<MultipartFile>.value(null);
|
||||
}
|
||||
|
||||
/// It's the method to post data from mqtt broker to Database (Thanks Rpi!)
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [int] idDevice (required):
|
||||
///
|
||||
/// * [List<SmartGardenMessage>] smartGardenMessage (required):
|
||||
Future<Response> iOTPostToDBSmartGardenWithHttpInfo(int idDevice, List<SmartGardenMessage> smartGardenMessage) async {
|
||||
// Verify required params are set.
|
||||
if (idDevice == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: idDevice');
|
||||
}
|
||||
if (smartGardenMessage == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: smartGardenMessage');
|
||||
}
|
||||
|
||||
final path = r'/api/iot/smartgarden/{idDevice}'
|
||||
.replaceAll('{' + 'idDevice' + '}', idDevice.toString());
|
||||
|
||||
Object postBody = smartGardenMessage;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// It's the method to post data from mqtt broker to Database (Thanks Rpi!)
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [int] idDevice (required):
|
||||
///
|
||||
/// * [List<SmartGardenMessage>] smartGardenMessage (required):
|
||||
Future<MultipartFile> iOTPostToDBSmartGarden(int idDevice, List<SmartGardenMessage> smartGardenMessage) async {
|
||||
final response = await iOTPostToDBSmartGardenWithHttpInfo(idDevice, smartGardenMessage);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return apiClient.deserialize(_decodeBodyBytes(response), 'MultipartFile') as MultipartFile;
|
||||
}
|
||||
return Future<MultipartFile>.value(null);
|
||||
}
|
||||
}
|
||||
74
mycore_api/lib/api/layout_api.dart
Normal file
74
mycore_api/lib/api/layout_api.dart
Normal file
@ -0,0 +1,74 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.0
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
|
||||
class LayoutApi {
|
||||
LayoutApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// It's a test ! :)
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> layoutGetWithHttpInfo() async {
|
||||
final path = r'/api/layout/panelSection';
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['bearer'];
|
||||
|
||||
if (
|
||||
nullableContentType != null &&
|
||||
nullableContentType.toLowerCase().startsWith('multipart/form-data')
|
||||
) {
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest(null, null);
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// It's a test ! :)
|
||||
Future<List<PanelSection>> layoutGet() async {
|
||||
final response = await layoutGetWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body != null && response.statusCode != HttpStatus.noContent) {
|
||||
return (apiClient.deserialize(_decodeBodyBytes(response), 'List<PanelSection>') as List)
|
||||
.cast<PanelSection>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<PanelSection>>.value(null);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user