Add scanner page + wip navigation
This commit is contained in:
parent
8e9acd5ba1
commit
d40c8df6a8
2
.flutter-plugins
Normal file
2
.flutter-plugins
Normal file
@ -0,0 +1,2 @@
|
||||
# This is a generated file; do not edit or check into version control.
|
||||
qr_code_scanner=C:\\Users\\thoma\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\qr_code_scanner-1.0.0\\
|
||||
1
.flutter-plugins-dependencies
Normal file
1
.flutter-plugins-dependencies
Normal file
@ -0,0 +1 @@
|
||||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"qr_code_scanner","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\qr_code_scanner-1.0.0\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"qr_code_scanner","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\qr_code_scanner-1.0.0\\\\","native_build":true,"dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"qr_code_scanner","dependencies":[]}],"date_created":"2022-06-30 22:24:10.288441","version":"3.0.3"}
|
||||
24
.packages
24
.packages
@ -3,30 +3,38 @@
|
||||
#
|
||||
# For more info see: https://dart.dev/go/dot-packages-deprecation
|
||||
#
|
||||
# Generated by pub on 2022-06-12 00:08:12.809192.
|
||||
# Generated by pub on 2022-06-30 21:52:59.329110.
|
||||
async:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/async-2.8.2/lib/
|
||||
boolean_selector:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/boolean_selector-2.1.0/lib/
|
||||
characters:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/characters-1.2.0/lib/
|
||||
charcode:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/charcode-1.3.1/lib/
|
||||
clock:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/clock-1.1.0/lib/
|
||||
collection:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/collection-1.15.0/lib/
|
||||
collection:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/collection-1.16.0/lib/
|
||||
cupertino_icons:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/cupertino_icons-1.0.5/lib/
|
||||
fake_async:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/fake_async-1.2.0/lib/
|
||||
fake_async:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/fake_async-1.3.0/lib/
|
||||
flutter:file:///C:/Users/thoma/Documents/flutter/packages/flutter/lib/
|
||||
flutter_lints:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/flutter_lints-1.0.4/lib/
|
||||
flutter_test:file:///C:/Users/thoma/Documents/flutter/packages/flutter_test/lib/
|
||||
flutter_web_plugins:file:///C:/Users/thoma/Documents/flutter/packages/flutter_web_plugins/lib/
|
||||
http:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/http-0.12.2/lib/
|
||||
http_parser:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/http_parser-3.1.4/lib/
|
||||
intl:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/intl-0.16.1/lib/
|
||||
js:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/js-0.6.4/lib/
|
||||
lints:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/lints-1.0.1/lib/
|
||||
managerapi:manager_api/lib/
|
||||
matcher:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/matcher-0.12.11/lib/
|
||||
material_color_utilities:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/material_color_utilities-0.1.3/lib/
|
||||
material_color_utilities:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/material_color_utilities-0.1.4/lib/
|
||||
meta:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/meta-1.7.0/lib/
|
||||
path:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/path-1.8.0/lib/
|
||||
path:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/path-1.8.1/lib/
|
||||
pedantic:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/pedantic-1.11.1/lib/
|
||||
qr_code_scanner:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/qr_code_scanner-1.0.0/lib/
|
||||
sky_engine:file:///C:/Users/thoma/Documents/flutter/bin/cache/pkg/sky_engine/lib/
|
||||
source_span:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/source_span-1.8.1/lib/
|
||||
source_span:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/source_span-1.8.2/lib/
|
||||
stack_trace:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/stack_trace-1.10.0/lib/
|
||||
stream_channel:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/stream_channel-2.1.0/lib/
|
||||
string_scanner:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/string_scanner-1.1.0/lib/
|
||||
term_glyph:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/term_glyph-1.2.0/lib/
|
||||
test_api:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/test_api-0.4.8/lib/
|
||||
test_api:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/test_api-0.4.9/lib/
|
||||
typed_data:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/typed_data-1.3.0/lib/
|
||||
vector_math:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/vector_math-2.1.1/lib/
|
||||
vector_math:file:///C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/vector_math-2.1.2/lib/
|
||||
mymuseum_visitapp:lib/
|
||||
|
||||
@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion flutter.compileSdkVersion
|
||||
compileSdkVersion 32
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
@ -44,7 +44,7 @@ android {
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "be.unov.myvisit.mymuseum_visitapp"
|
||||
minSdkVersion flutter.minSdkVersion
|
||||
minSdkVersion 20
|
||||
targetSdkVersion flutter.targetSdkVersion
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="be.unov.myvisit.mymuseum_visitapp">
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||
<application
|
||||
android:label="mymuseum_visitapp"
|
||||
android:name="${applicationName}"
|
||||
@ -24,6 +27,7 @@
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
|
||||
</activity>
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
|
||||
87
lib/Screens/Article/article.dart
Normal file
87
lib/Screens/Article/article.dart
Normal file
@ -0,0 +1,87 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ArticlePage extends StatefulWidget {
|
||||
const ArticlePage({Key? key, required this.title}) : super(key: key);
|
||||
|
||||
// This widget is the home page of your application. It is stateful, meaning
|
||||
// that it has a State object (defined below) that contains fields that affect
|
||||
// how it looks.
|
||||
|
||||
// This class is the configuration for the state. It holds the values (in this
|
||||
// case the title) provided by the parent (in this case the App widget) and
|
||||
// used by the build method of the State. Fields in a Widget subclass are
|
||||
// always marked "final".
|
||||
|
||||
final String title;
|
||||
|
||||
@override
|
||||
State<ArticlePage> createState() => _ArticlePageState();
|
||||
}
|
||||
|
||||
class _ArticlePageState extends State<ArticlePage> {
|
||||
int _counter = 0;
|
||||
|
||||
void _incrementCounter() {
|
||||
setState(() {
|
||||
// This call to setState tells the Flutter framework that something has
|
||||
// changed in this State, which causes it to rerun the build method below
|
||||
// so that the display can reflect the updated values. If we changed
|
||||
// _counter without calling setState(), then the build method would not be
|
||||
// called again, and so nothing would appear to happen.
|
||||
_counter++;
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// This method is rerun every time setState is called, for instance as done
|
||||
// by the _incrementCounter method above.
|
||||
//
|
||||
// The Flutter framework has been optimized to make rerunning build methods
|
||||
// fast, so that you can just rebuild anything that needs updating rather
|
||||
// than having to individually change instances of widgets.
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
// Here we take the value from the MyHomePage object that was created by
|
||||
// the App.build method, and use it to set our appbar title.
|
||||
title: Text("ArticlePage"),
|
||||
),
|
||||
body: Center(
|
||||
// Center is a layout widget. It takes a single child and positions it
|
||||
// in the middle of the parent.
|
||||
child: Column(
|
||||
// Column is also a layout widget. It takes a list of children and
|
||||
// arranges them vertically. By default, it sizes itself to fit its
|
||||
// children horizontally, and tries to be as tall as its parent.
|
||||
//
|
||||
// Invoke "debug painting" (press "p" in the console, choose the
|
||||
// "Toggle Debug Paint" action from the Flutter Inspector in Android
|
||||
// Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
|
||||
// to see the wireframe for each widget.
|
||||
//
|
||||
// Column has various properties to control how it sizes itself and
|
||||
// how it positions its children. Here we use mainAxisAlignment to
|
||||
// center the children vertically; the main axis here is the vertical
|
||||
// axis because Columns are vertical (the cross axis would be
|
||||
// horizontal).
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
const Text(
|
||||
'You have pushed the button this many times:',
|
||||
),
|
||||
Text(
|
||||
'$_counter',
|
||||
style: Theme.of(context).textTheme.headline4,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: _incrementCounter,
|
||||
tooltip: 'Increment',
|
||||
child: const Icon(Icons.add),
|
||||
), // This trailing comma makes auto-formatting nicer for build methods.
|
||||
);
|
||||
}
|
||||
}
|
||||
87
lib/Screens/Home/home.dart
Normal file
87
lib/Screens/Home/home.dart
Normal file
@ -0,0 +1,87 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class MyHomePage extends StatefulWidget {
|
||||
const MyHomePage({Key? key, required this.title}) : super(key: key);
|
||||
|
||||
// This widget is the home page of your application. It is stateful, meaning
|
||||
// that it has a State object (defined below) that contains fields that affect
|
||||
// how it looks.
|
||||
|
||||
// This class is the configuration for the state. It holds the values (in this
|
||||
// case the title) provided by the parent (in this case the App widget) and
|
||||
// used by the build method of the State. Fields in a Widget subclass are
|
||||
// always marked "final".
|
||||
|
||||
final String title;
|
||||
|
||||
@override
|
||||
State<MyHomePage> createState() => _MyHomePageState();
|
||||
}
|
||||
|
||||
class _MyHomePageState extends State<MyHomePage> {
|
||||
int _counter = 0;
|
||||
|
||||
void _incrementCounter() {
|
||||
setState(() {
|
||||
// This call to setState tells the Flutter framework that something has
|
||||
// changed in this State, which causes it to rerun the build method below
|
||||
// so that the display can reflect the updated values. If we changed
|
||||
// _counter without calling setState(), then the build method would not be
|
||||
// called again, and so nothing would appear to happen.
|
||||
_counter++;
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// This method is rerun every time setState is called, for instance as done
|
||||
// by the _incrementCounter method above.
|
||||
//
|
||||
// The Flutter framework has been optimized to make rerunning build methods
|
||||
// fast, so that you can just rebuild anything that needs updating rather
|
||||
// than having to individually change instances of widgets.
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
// Here we take the value from the MyHomePage object that was created by
|
||||
// the App.build method, and use it to set our appbar title.
|
||||
title: Text(widget.title),
|
||||
),
|
||||
body: Center(
|
||||
// Center is a layout widget. It takes a single child and positions it
|
||||
// in the middle of the parent.
|
||||
child: Column(
|
||||
// Column is also a layout widget. It takes a list of children and
|
||||
// arranges them vertically. By default, it sizes itself to fit its
|
||||
// children horizontally, and tries to be as tall as its parent.
|
||||
//
|
||||
// Invoke "debug painting" (press "p" in the console, choose the
|
||||
// "Toggle Debug Paint" action from the Flutter Inspector in Android
|
||||
// Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
|
||||
// to see the wireframe for each widget.
|
||||
//
|
||||
// Column has various properties to control how it sizes itself and
|
||||
// how it positions its children. Here we use mainAxisAlignment to
|
||||
// center the children vertically; the main axis here is the vertical
|
||||
// axis because Columns are vertical (the cross axis would be
|
||||
// horizontal).
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
const Text(
|
||||
'You have pushed the button this many times:',
|
||||
),
|
||||
Text(
|
||||
'$_counter',
|
||||
style: Theme.of(context).textTheme.headline4,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: _incrementCounter,
|
||||
tooltip: 'Increment',
|
||||
child: const Icon(Icons.add),
|
||||
), // This trailing comma makes auto-formatting nicer for build methods.
|
||||
);
|
||||
}
|
||||
}
|
||||
202
lib/Screens/Scanner/scanner.dart
Normal file
202
lib/Screens/Scanner/scanner.dart
Normal file
@ -0,0 +1,202 @@
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mymuseum_visitapp/Screens/Article/article.dart';
|
||||
import 'package:qr_code_scanner/qr_code_scanner.dart';
|
||||
|
||||
|
||||
class ScannerPage extends StatefulWidget {
|
||||
const ScannerPage({Key? key, required this.title}) : super(key: key);
|
||||
|
||||
// This widget is the home page of your application. It is stateful, meaning
|
||||
// that it has a State object (defined below) that contains fields that affect
|
||||
// how it looks.
|
||||
|
||||
// This class is the configuration for the state. It holds the values (in this
|
||||
// case the title) provided by the parent (in this case the App widget) and
|
||||
// used by the build method of the State. Fields in a Widget subclass are
|
||||
// always marked "final".
|
||||
|
||||
final String title;
|
||||
|
||||
@override
|
||||
State<ScannerPage> createState() => _ScannerPageState();
|
||||
}
|
||||
|
||||
class _ScannerPageState extends State<ScannerPage> {
|
||||
Barcode? result;
|
||||
QRViewController? controller;
|
||||
final GlobalKey qrKey = GlobalKey(debugLabel: 'QR');
|
||||
|
||||
// In order to get hot reload to work we need to pause the camera if the platform
|
||||
// is android, or resume the camera if the platform is iOS.
|
||||
@override
|
||||
void reassemble() {
|
||||
super.reassemble();
|
||||
if (Platform.isAndroid) {
|
||||
controller!.pauseCamera();
|
||||
}
|
||||
controller!.resumeCamera();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Column(
|
||||
children: <Widget>[
|
||||
Expanded(flex: 4, child: _buildQrView(context)),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: FittedBox(
|
||||
fit: BoxFit.contain,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: <Widget>[
|
||||
if (result != null)
|
||||
Text(
|
||||
'Barcode Type: ${describeEnum(result!.format)} Data: ${result!.code}')
|
||||
else
|
||||
const Text('Scan a code'),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
margin: const EdgeInsets.all(8),
|
||||
child: ElevatedButton(
|
||||
onPressed: () async {
|
||||
await controller?.toggleFlash();
|
||||
setState(() {});
|
||||
},
|
||||
child: FutureBuilder(
|
||||
future: controller?.getFlashStatus(),
|
||||
builder: (context, snapshot) {
|
||||
return Icon(Icons.flash_on);
|
||||
},
|
||||
)),
|
||||
),
|
||||
/*Container(
|
||||
margin: const EdgeInsets.all(8),
|
||||
child: ElevatedButton(
|
||||
onPressed: () async {
|
||||
await controller?.flipCamera();
|
||||
setState(() {});
|
||||
},
|
||||
child: FutureBuilder(
|
||||
future: controller?.getCameraInfo(),
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.data != null) {
|
||||
return Text(
|
||||
'Camera facing ${describeEnum(snapshot.data!)}');
|
||||
} else {
|
||||
return const Text('loading');
|
||||
}
|
||||
},
|
||||
)),
|
||||
)*/
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
margin: const EdgeInsets.all(8),
|
||||
child: ElevatedButton(
|
||||
onPressed: () async {
|
||||
await controller?.pauseCamera();
|
||||
},
|
||||
child: const Text('pause',
|
||||
style: TextStyle(fontSize: 20)),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: const EdgeInsets.all(8),
|
||||
child: ElevatedButton(
|
||||
onPressed: () async {
|
||||
await controller?.resumeCamera();
|
||||
},
|
||||
child: const Text('resume',
|
||||
style: TextStyle(fontSize: 20)),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildQrView(BuildContext context) {
|
||||
// For this example we check how width or tall the device is and change the scanArea and overlay accordingly.
|
||||
var scanArea = (MediaQuery.of(context).size.width < 400 ||
|
||||
MediaQuery.of(context).size.height < 400)
|
||||
? 225.0
|
||||
: 300.0;
|
||||
// To ensure the Scanner view is properly sizes after rotation
|
||||
// we need to listen for Flutter SizeChanged notification and update controller
|
||||
return QRView(
|
||||
key: qrKey,
|
||||
onQRViewCreated: _onQRViewCreated,
|
||||
overlay: QrScannerOverlayShape(
|
||||
borderColor: Colors.blueAccent,
|
||||
borderRadius: 10,
|
||||
borderLength: 25,
|
||||
borderWidth: 5,
|
||||
cutOutSize: 225.0),
|
||||
onPermissionSet: (ctrl, p) => _onPermissionSet(context, ctrl, p),
|
||||
);
|
||||
}
|
||||
|
||||
void _onQRViewCreated(QRViewController controller) {
|
||||
setState(() {
|
||||
this.controller = controller;
|
||||
});
|
||||
|
||||
controller.scannedDataStream.listen((scanData) {
|
||||
setState(() {
|
||||
result = scanData;
|
||||
print(result);
|
||||
if(result!.format == BarcodeFormat.qrcode) {
|
||||
controller!.pauseCamera();
|
||||
print("QR CODE FOUND");
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(content: Text('QR CODE FOUND')),
|
||||
);
|
||||
|
||||
// TODO search in local if data == Id of Article
|
||||
// If so, navigate to article view
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) {
|
||||
return ArticlePage(title: "test");
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
void _onPermissionSet(BuildContext context, QRViewController ctrl, bool p) {
|
||||
//log('${DateTime.now().toIso8601String()}_onPermissionSet $p');
|
||||
if (!p) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(content: Text('no Permission')),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
controller?.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
37
lib/client.dart
Normal file
37
lib/client.dart
Normal file
@ -0,0 +1,37 @@
|
||||
import 'package:managerapi/api.dart';
|
||||
//import 'package:openapi_dart_common/openapi.dart';
|
||||
|
||||
class Client {
|
||||
ApiClient _apiClient;
|
||||
ApiClient get apiApi => _apiClient;
|
||||
|
||||
AuthenticationApi _authenticationApi;
|
||||
AuthenticationApi get authenticationApi => _authenticationApi;
|
||||
|
||||
UserApi _userApi;
|
||||
UserApi get userApi => _userApi;
|
||||
|
||||
ConfigurationApi _configurationApi;
|
||||
ConfigurationApi get configurationApi => _configurationApi;
|
||||
|
||||
SectionApi _sectionApi;
|
||||
SectionApi get sectionApi => _sectionApi;
|
||||
|
||||
ResourceApi _resourceApi;
|
||||
ResourceApi get resourceApi => _resourceApi;
|
||||
|
||||
DeviceApi _deviceApi;
|
||||
DeviceApi get deviceApi => _deviceApi;
|
||||
|
||||
Client(String path) {
|
||||
_apiClient = ApiClient(
|
||||
basePath: path); // "http://192.168.31.96"
|
||||
//basePath: "https://localhost:44339");
|
||||
_authenticationApi = AuthenticationApi(_apiClient);
|
||||
_userApi = UserApi(_apiClient);
|
||||
_configurationApi = ConfigurationApi(_apiClient);
|
||||
_sectionApi = SectionApi(_apiClient);
|
||||
_resourceApi = ResourceApi(_apiClient);
|
||||
_deviceApi = DeviceApi(_apiClient);
|
||||
}
|
||||
}
|
||||
35
lib/constants.dart
Normal file
35
lib/constants.dart
Normal file
@ -0,0 +1,35 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
// Colors - TO FILL WIT CORRECT COLOR
|
||||
const kBackgroundColor = Color(0xFFFFFFFF);
|
||||
|
||||
const kMainGrey = Color(0xFF424242);
|
||||
const kSecondGrey = Color(0xFF555457);
|
||||
const kTestSecondColor = Color(0xFF2F4858);
|
||||
const kMainRed = Color(0xFF8b0000);
|
||||
const kSecondRed = Color(0xFF622727);
|
||||
const kTextRed = Color(0xFFba0505);
|
||||
const kBackgroundGrey = Color(0xFFb5b7b9);
|
||||
const kBackgroundSecondGrey = Color(0xFF5b5b63);
|
||||
|
||||
const kBackgroundLight = Color(0xfff3f3f3);
|
||||
|
||||
const List<String> languages = ["FR", "NL", "EN", "DE"];
|
||||
|
||||
const kTitleSize = 40.0;
|
||||
const kDescriptionSize = 25.0;
|
||||
|
||||
const kSectionTitleDetailSize = 50.0;
|
||||
const kSectionDescriptionDetailSize = 35.0;
|
||||
|
||||
const kMenuTitleDetailSize = 45.0;
|
||||
const kMenuDescriptionDetailSize = 28.0;
|
||||
|
||||
const kNoneInfoOrIncorrect = 35.0;
|
||||
|
||||
/*
|
||||
const kTextStyle = TextStyle(
|
||||
fontSize: 23,
|
||||
color: kPrimaryColor,
|
||||
fontWeight: FontWeight.w600,
|
||||
);*/
|
||||
@ -1,5 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'Screens/Scanner/scanner.dart';
|
||||
|
||||
void main() {
|
||||
runApp(const MyApp());
|
||||
}
|
||||
@ -11,7 +13,7 @@ class MyApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: 'MyVisit Flutter Demo',
|
||||
title: 'MyVisit App',
|
||||
theme: ThemeData(
|
||||
// This is the theme of your application.
|
||||
//
|
||||
@ -24,92 +26,7 @@ class MyApp extends StatelessWidget {
|
||||
// is not restarted.
|
||||
primarySwatch: Colors.blue,
|
||||
),
|
||||
home: const MyHomePage(title: 'MyVisit Flutter Demo Home page'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class MyHomePage extends StatefulWidget {
|
||||
const MyHomePage({Key? key, required this.title}) : super(key: key);
|
||||
|
||||
// This widget is the home page of your application. It is stateful, meaning
|
||||
// that it has a State object (defined below) that contains fields that affect
|
||||
// how it looks.
|
||||
|
||||
// This class is the configuration for the state. It holds the values (in this
|
||||
// case the title) provided by the parent (in this case the App widget) and
|
||||
// used by the build method of the State. Fields in a Widget subclass are
|
||||
// always marked "final".
|
||||
|
||||
final String title;
|
||||
|
||||
@override
|
||||
State<MyHomePage> createState() => _MyHomePageState();
|
||||
}
|
||||
|
||||
class _MyHomePageState extends State<MyHomePage> {
|
||||
int _counter = 0;
|
||||
|
||||
void _incrementCounter() {
|
||||
setState(() {
|
||||
// This call to setState tells the Flutter framework that something has
|
||||
// changed in this State, which causes it to rerun the build method below
|
||||
// so that the display can reflect the updated values. If we changed
|
||||
// _counter without calling setState(), then the build method would not be
|
||||
// called again, and so nothing would appear to happen.
|
||||
_counter++;
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// This method is rerun every time setState is called, for instance as done
|
||||
// by the _incrementCounter method above.
|
||||
//
|
||||
// The Flutter framework has been optimized to make rerunning build methods
|
||||
// fast, so that you can just rebuild anything that needs updating rather
|
||||
// than having to individually change instances of widgets.
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
// Here we take the value from the MyHomePage object that was created by
|
||||
// the App.build method, and use it to set our appbar title.
|
||||
title: Text(widget.title),
|
||||
),
|
||||
body: Center(
|
||||
// Center is a layout widget. It takes a single child and positions it
|
||||
// in the middle of the parent.
|
||||
child: Column(
|
||||
// Column is also a layout widget. It takes a list of children and
|
||||
// arranges them vertically. By default, it sizes itself to fit its
|
||||
// children horizontally, and tries to be as tall as its parent.
|
||||
//
|
||||
// Invoke "debug painting" (press "p" in the console, choose the
|
||||
// "Toggle Debug Paint" action from the Flutter Inspector in Android
|
||||
// Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
|
||||
// to see the wireframe for each widget.
|
||||
//
|
||||
// Column has various properties to control how it sizes itself and
|
||||
// how it positions its children. Here we use mainAxisAlignment to
|
||||
// center the children vertically; the main axis here is the vertical
|
||||
// axis because Columns are vertical (the cross axis would be
|
||||
// horizontal).
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
const Text(
|
||||
'You have pushed the button this many times:',
|
||||
),
|
||||
Text(
|
||||
'$_counter',
|
||||
style: Theme.of(context).textTheme.headline4,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: _incrementCounter,
|
||||
tooltip: 'Increment',
|
||||
child: const Icon(Icons.add),
|
||||
), // This trailing comma makes auto-formatting nicer for build methods.
|
||||
home: const ScannerPage(title: 'MyVisit App'), // Scanner to test
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,6 +5,9 @@
|
||||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
)
|
||||
|
||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||
)
|
||||
|
||||
set(PLUGIN_BUNDLED_LIBRARIES)
|
||||
|
||||
foreach(plugin ${FLUTTER_PLUGIN_LIST})
|
||||
@ -13,3 +16,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST})
|
||||
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
|
||||
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
|
||||
endforeach(plugin)
|
||||
|
||||
foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
|
||||
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
|
||||
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
|
||||
endforeach(ffi_plugin)
|
||||
|
||||
27
manager_api/.gitignore
vendored
Normal file
27
manager_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
manager_api/.openapi-generator-ignore
Normal file
23
manager_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
|
||||
86
manager_api/.openapi-generator/FILES
Normal file
86
manager_api/.openapi-generator/FILES
Normal file
@ -0,0 +1,86 @@
|
||||
.gitignore
|
||||
.travis.yml
|
||||
README.md
|
||||
doc/ArticleDTO.md
|
||||
doc/AuthenticationApi.md
|
||||
doc/ConfigurationApi.md
|
||||
doc/ConfigurationDTO.md
|
||||
doc/DeviceApi.md
|
||||
doc/DeviceDTO.md
|
||||
doc/DeviceDetailDTO.md
|
||||
doc/DeviceDetailDTOAllOf.md
|
||||
doc/ExportConfigurationDTO.md
|
||||
doc/ExportConfigurationDTOAllOf.md
|
||||
doc/GeoPointDTO.md
|
||||
doc/ImageDTO.md
|
||||
doc/ImageGeoPoint.md
|
||||
doc/LevelDTO.md
|
||||
doc/LoginDTO.md
|
||||
doc/MapDTO.md
|
||||
doc/MapTypeApp.md
|
||||
doc/MenuDTO.md
|
||||
doc/PlayerMessageDTO.md
|
||||
doc/QuestionDTO.md
|
||||
doc/QuizzDTO.md
|
||||
doc/ResourceApi.md
|
||||
doc/ResourceDTO.md
|
||||
doc/ResourceType.md
|
||||
doc/ResponseDTO.md
|
||||
doc/SectionApi.md
|
||||
doc/SectionDTO.md
|
||||
doc/SectionType.md
|
||||
doc/SliderDTO.md
|
||||
doc/TokenDTO.md
|
||||
doc/TranslationDTO.md
|
||||
doc/User.md
|
||||
doc/UserApi.md
|
||||
doc/UserDetailDTO.md
|
||||
doc/VideoDTO.md
|
||||
doc/WebDTO.md
|
||||
git_push.sh
|
||||
lib/api.dart
|
||||
lib/api/authentication_api.dart
|
||||
lib/api/configuration_api.dart
|
||||
lib/api/device_api.dart
|
||||
lib/api/resource_api.dart
|
||||
lib/api/section_api.dart
|
||||
lib/api/user_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/article_dto.dart
|
||||
lib/model/configuration_dto.dart
|
||||
lib/model/device_detail_dto.dart
|
||||
lib/model/device_detail_dto_all_of.dart
|
||||
lib/model/device_dto.dart
|
||||
lib/model/export_configuration_dto.dart
|
||||
lib/model/export_configuration_dto_all_of.dart
|
||||
lib/model/geo_point_dto.dart
|
||||
lib/model/image_dto.dart
|
||||
lib/model/image_geo_point.dart
|
||||
lib/model/level_dto.dart
|
||||
lib/model/login_dto.dart
|
||||
lib/model/map_dto.dart
|
||||
lib/model/map_type_app.dart
|
||||
lib/model/menu_dto.dart
|
||||
lib/model/player_message_dto.dart
|
||||
lib/model/question_dto.dart
|
||||
lib/model/quizz_dto.dart
|
||||
lib/model/resource_dto.dart
|
||||
lib/model/resource_type.dart
|
||||
lib/model/response_dto.dart
|
||||
lib/model/section_dto.dart
|
||||
lib/model/section_type.dart
|
||||
lib/model/slider_dto.dart
|
||||
lib/model/token_dto.dart
|
||||
lib/model/translation_dto.dart
|
||||
lib/model/user.dart
|
||||
lib/model/user_detail_dto.dart
|
||||
lib/model/video_dto.dart
|
||||
lib/model/web_dto.dart
|
||||
pubspec.yaml
|
||||
1
manager_api/.openapi-generator/VERSION
Normal file
1
manager_api/.openapi-generator/VERSION
Normal file
@ -0,0 +1 @@
|
||||
5.1.0
|
||||
14
manager_api/.travis.yml
Normal file
14
manager_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
|
||||
163
manager_api/README.md
Normal file
163
manager_api/README.md
Normal file
@ -0,0 +1,163 @@
|
||||
# managerapi
|
||||
API Manager Service
|
||||
|
||||
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: Version 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:
|
||||
managerapi:
|
||||
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:
|
||||
managerapi:
|
||||
path: /path/to/managerapi
|
||||
```
|
||||
|
||||
## Tests
|
||||
|
||||
TODO
|
||||
|
||||
## Getting Started
|
||||
|
||||
Please follow the [installation procedure](#installation--usage) and then run the following:
|
||||
|
||||
```dart
|
||||
import 'package:managerapi/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://localhost:5000*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*AuthenticationApi* | [**authenticationAuthenticateWithForm**](doc\/AuthenticationApi.md#authenticationauthenticatewithform) | **POST** /api/Authentication/Token |
|
||||
*AuthenticationApi* | [**authenticationAuthenticateWithJson**](doc\/AuthenticationApi.md#authenticationauthenticatewithjson) | **POST** /api/Authentication/Authenticate |
|
||||
*ConfigurationApi* | [**configurationCreate**](doc\/ConfigurationApi.md#configurationcreate) | **POST** /api/Configuration |
|
||||
*ConfigurationApi* | [**configurationDelete**](doc\/ConfigurationApi.md#configurationdelete) | **DELETE** /api/Configuration/{id} |
|
||||
*ConfigurationApi* | [**configurationExport**](doc\/ConfigurationApi.md#configurationexport) | **GET** /api/Configuration/{id}/export |
|
||||
*ConfigurationApi* | [**configurationGet**](doc\/ConfigurationApi.md#configurationget) | **GET** /api/Configuration |
|
||||
*ConfigurationApi* | [**configurationGetDetail**](doc\/ConfigurationApi.md#configurationgetdetail) | **GET** /api/Configuration/{id} |
|
||||
*ConfigurationApi* | [**configurationImport**](doc\/ConfigurationApi.md#configurationimport) | **POST** /api/Configuration/import |
|
||||
*ConfigurationApi* | [**configurationUpdate**](doc\/ConfigurationApi.md#configurationupdate) | **PUT** /api/Configuration |
|
||||
*DeviceApi* | [**deviceCreate**](doc\/DeviceApi.md#devicecreate) | **POST** /api/Device |
|
||||
*DeviceApi* | [**deviceDelete**](doc\/DeviceApi.md#devicedelete) | **DELETE** /api/Device/{id} |
|
||||
*DeviceApi* | [**deviceGet**](doc\/DeviceApi.md#deviceget) | **GET** /api/Device |
|
||||
*DeviceApi* | [**deviceGetDetail**](doc\/DeviceApi.md#devicegetdetail) | **GET** /api/Device/{id}/detail |
|
||||
*DeviceApi* | [**deviceUpdate**](doc\/DeviceApi.md#deviceupdate) | **PUT** /api/Device |
|
||||
*DeviceApi* | [**deviceUpdateMainInfos**](doc\/DeviceApi.md#deviceupdatemaininfos) | **PUT** /api/Device/mainInfos |
|
||||
*ResourceApi* | [**resourceCreate**](doc\/ResourceApi.md#resourcecreate) | **POST** /api/Resource |
|
||||
*ResourceApi* | [**resourceDelete**](doc\/ResourceApi.md#resourcedelete) | **DELETE** /api/Resource/{id} |
|
||||
*ResourceApi* | [**resourceGet**](doc\/ResourceApi.md#resourceget) | **GET** /api/Resource |
|
||||
*ResourceApi* | [**resourceGetDetail**](doc\/ResourceApi.md#resourcegetdetail) | **GET** /api/Resource/{id}/detail |
|
||||
*ResourceApi* | [**resourceShow**](doc\/ResourceApi.md#resourceshow) | **GET** /api/Resource/{id} |
|
||||
*ResourceApi* | [**resourceUpdate**](doc\/ResourceApi.md#resourceupdate) | **PUT** /api/Resource |
|
||||
*ResourceApi* | [**resourceUpload**](doc\/ResourceApi.md#resourceupload) | **POST** /api/Resource/upload |
|
||||
*SectionApi* | [**sectionCreate**](doc\/SectionApi.md#sectioncreate) | **POST** /api/Section |
|
||||
*SectionApi* | [**sectionDelete**](doc\/SectionApi.md#sectiondelete) | **DELETE** /api/Section/{id} |
|
||||
*SectionApi* | [**sectionDeleteAllForConfiguration**](doc\/SectionApi.md#sectiondeleteallforconfiguration) | **DELETE** /api/Section/configuration/{id} |
|
||||
*SectionApi* | [**sectionGet**](doc\/SectionApi.md#sectionget) | **GET** /api/Section |
|
||||
*SectionApi* | [**sectionGetAllSectionSubSections**](doc\/SectionApi.md#sectiongetallsectionsubsections) | **GET** /api/Section/{id}/subsections |
|
||||
*SectionApi* | [**sectionGetArticleDTO**](doc\/SectionApi.md#sectiongetarticledto) | **GET** /api/Section/ArticleDTO |
|
||||
*SectionApi* | [**sectionGetDetail**](doc\/SectionApi.md#sectiongetdetail) | **GET** /api/Section/{id} |
|
||||
*SectionApi* | [**sectionGetFromConfiguration**](doc\/SectionApi.md#sectiongetfromconfiguration) | **GET** /api/Section/configuration/{id} |
|
||||
*SectionApi* | [**sectionGetMapDTO**](doc\/SectionApi.md#sectiongetmapdto) | **GET** /api/Section/MapDTO |
|
||||
*SectionApi* | [**sectionGetMenuDTO**](doc\/SectionApi.md#sectiongetmenudto) | **GET** /api/Section/MenuDTO |
|
||||
*SectionApi* | [**sectionGetQuizzDTO**](doc\/SectionApi.md#sectiongetquizzdto) | **GET** /api/Section/QuizzDTO |
|
||||
*SectionApi* | [**sectionGetSliderDTO**](doc\/SectionApi.md#sectiongetsliderdto) | **GET** /api/Section/SliderDTO |
|
||||
*SectionApi* | [**sectionGetVideoDTO**](doc\/SectionApi.md#sectiongetvideodto) | **GET** /api/Section/VideoDTO |
|
||||
*SectionApi* | [**sectionGetWebDTO**](doc\/SectionApi.md#sectiongetwebdto) | **GET** /api/Section/WebDTO |
|
||||
*SectionApi* | [**sectionPlayerMessageDTO**](doc\/SectionApi.md#sectionplayermessagedto) | **GET** /api/Section/PlayerMessageDTO |
|
||||
*SectionApi* | [**sectionUpdate**](doc\/SectionApi.md#sectionupdate) | **PUT** /api/Section |
|
||||
*SectionApi* | [**sectionUpdateOrder**](doc\/SectionApi.md#sectionupdateorder) | **PUT** /api/Section/order |
|
||||
*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 |
|
||||
*UserApi* | [**userGetDetail**](doc\/UserApi.md#usergetdetail) | **GET** /api/User/{id} |
|
||||
*UserApi* | [**userUpdateUser**](doc\/UserApi.md#userupdateuser) | **PUT** /api/User |
|
||||
|
||||
|
||||
## Documentation For Models
|
||||
|
||||
- [ArticleDTO](doc\/ArticleDTO.md)
|
||||
- [ConfigurationDTO](doc\/ConfigurationDTO.md)
|
||||
- [DeviceDTO](doc\/DeviceDTO.md)
|
||||
- [DeviceDetailDTO](doc\/DeviceDetailDTO.md)
|
||||
- [DeviceDetailDTOAllOf](doc\/DeviceDetailDTOAllOf.md)
|
||||
- [ExportConfigurationDTO](doc\/ExportConfigurationDTO.md)
|
||||
- [ExportConfigurationDTOAllOf](doc\/ExportConfigurationDTOAllOf.md)
|
||||
- [GeoPointDTO](doc\/GeoPointDTO.md)
|
||||
- [ImageDTO](doc\/ImageDTO.md)
|
||||
- [ImageGeoPoint](doc\/ImageGeoPoint.md)
|
||||
- [LevelDTO](doc\/LevelDTO.md)
|
||||
- [LoginDTO](doc\/LoginDTO.md)
|
||||
- [MapDTO](doc\/MapDTO.md)
|
||||
- [MapTypeApp](doc\/MapTypeApp.md)
|
||||
- [MenuDTO](doc\/MenuDTO.md)
|
||||
- [PlayerMessageDTO](doc\/PlayerMessageDTO.md)
|
||||
- [QuestionDTO](doc\/QuestionDTO.md)
|
||||
- [QuizzDTO](doc\/QuizzDTO.md)
|
||||
- [ResourceDTO](doc\/ResourceDTO.md)
|
||||
- [ResourceType](doc\/ResourceType.md)
|
||||
- [ResponseDTO](doc\/ResponseDTO.md)
|
||||
- [SectionDTO](doc\/SectionDTO.md)
|
||||
- [SectionType](doc\/SectionType.md)
|
||||
- [SliderDTO](doc\/SliderDTO.md)
|
||||
- [TokenDTO](doc\/TokenDTO.md)
|
||||
- [TranslationDTO](doc\/TranslationDTO.md)
|
||||
- [User](doc\/User.md)
|
||||
- [UserDetailDTO](doc\/UserDetailDTO.md)
|
||||
- [VideoDTO](doc\/VideoDTO.md)
|
||||
- [WebDTO](doc\/WebDTO.md)
|
||||
|
||||
|
||||
## Documentation For Authorization
|
||||
|
||||
|
||||
## bearer
|
||||
|
||||
- **Type**: OAuth
|
||||
- **Flow**: password
|
||||
- **Authorization URL**: /authentication/Token
|
||||
- **Scopes**:
|
||||
- **Manager-api**: Manager WebAPI
|
||||
|
||||
|
||||
## Author
|
||||
|
||||
|
||||
|
||||
|
||||
20
manager_api/doc/ArticleDTO.md
Normal file
20
manager_api/doc/ArticleDTO.md
Normal file
@ -0,0 +1,20 @@
|
||||
# managerapi.model.ArticleDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**content** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||
**qrCode** | **String** | | [optional]
|
||||
**isContentTop** | **bool** | | [optional]
|
||||
**audioId** | **String** | | [optional]
|
||||
**isReadAudioAuto** | **bool** | | [optional]
|
||||
**images** | [**List<ImageDTO>**](ImageDTO.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)
|
||||
|
||||
|
||||
109
manager_api/doc/AuthenticationApi.md
Normal file
109
manager_api/doc/AuthenticationApi.md
Normal file
@ -0,0 +1,109 @@
|
||||
# managerapi.api.AuthenticationApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://localhost:5000*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**authenticationAuthenticateWithForm**](AuthenticationApi.md#authenticationauthenticatewithform) | **POST** /api/Authentication/Token |
|
||||
[**authenticationAuthenticateWithJson**](AuthenticationApi.md#authenticationauthenticatewithjson) | **POST** /api/Authentication/Authenticate |
|
||||
|
||||
|
||||
# **authenticationAuthenticateWithForm**
|
||||
> TokenDTO authenticationAuthenticateWithForm(grantType, username, password, clientId, clientSecret)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/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
|
||||
|
||||
[**TokenDTO**](TokenDTO.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**
|
||||
> TokenDTO authenticationAuthenticateWithJson(loginDTO)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/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 |
|
||||
|
||||
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)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**TokenDTO**](TokenDTO.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)
|
||||
|
||||
317
manager_api/doc/ConfigurationApi.md
Normal file
317
manager_api/doc/ConfigurationApi.md
Normal file
@ -0,0 +1,317 @@
|
||||
# managerapi.api.ConfigurationApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://localhost:5000*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**configurationCreate**](ConfigurationApi.md#configurationcreate) | **POST** /api/Configuration |
|
||||
[**configurationDelete**](ConfigurationApi.md#configurationdelete) | **DELETE** /api/Configuration/{id} |
|
||||
[**configurationExport**](ConfigurationApi.md#configurationexport) | **GET** /api/Configuration/{id}/export |
|
||||
[**configurationGet**](ConfigurationApi.md#configurationget) | **GET** /api/Configuration |
|
||||
[**configurationGetDetail**](ConfigurationApi.md#configurationgetdetail) | **GET** /api/Configuration/{id} |
|
||||
[**configurationImport**](ConfigurationApi.md#configurationimport) | **POST** /api/Configuration/import |
|
||||
[**configurationUpdate**](ConfigurationApi.md#configurationupdate) | **PUT** /api/Configuration |
|
||||
|
||||
|
||||
# **configurationCreate**
|
||||
> ConfigurationDTO configurationCreate(configurationDTO)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = ConfigurationApi();
|
||||
final configurationDTO = ConfigurationDTO(); // ConfigurationDTO |
|
||||
|
||||
try {
|
||||
final result = api_instance.configurationCreate(configurationDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ConfigurationApi->configurationCreate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**configurationDTO** | [**ConfigurationDTO**](ConfigurationDTO.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**ConfigurationDTO**](ConfigurationDTO.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)
|
||||
|
||||
# **configurationDelete**
|
||||
> String configurationDelete(id)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = ConfigurationApi();
|
||||
final id = id_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.configurationDelete(id);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ConfigurationApi->configurationDelete: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **String**| |
|
||||
|
||||
### 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)
|
||||
|
||||
# **configurationExport**
|
||||
> ExportConfigurationDTO configurationExport(id)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = ConfigurationApi();
|
||||
final id = id_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.configurationExport(id);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ConfigurationApi->configurationExport: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **String**| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**ExportConfigurationDTO**](ExportConfigurationDTO.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)
|
||||
|
||||
# **configurationGet**
|
||||
> List<ConfigurationDTO> configurationGet()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = ConfigurationApi();
|
||||
|
||||
try {
|
||||
final result = api_instance.configurationGet();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ConfigurationApi->configurationGet: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<ConfigurationDTO>**](ConfigurationDTO.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)
|
||||
|
||||
# **configurationGetDetail**
|
||||
> ConfigurationDTO configurationGetDetail(id)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = ConfigurationApi();
|
||||
final id = id_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.configurationGetDetail(id);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ConfigurationApi->configurationGetDetail: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **String**| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**ConfigurationDTO**](ConfigurationDTO.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)
|
||||
|
||||
# **configurationImport**
|
||||
> String configurationImport(exportConfigurationDTO)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = ConfigurationApi();
|
||||
final exportConfigurationDTO = ExportConfigurationDTO(); // ExportConfigurationDTO |
|
||||
|
||||
try {
|
||||
final result = api_instance.configurationImport(exportConfigurationDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ConfigurationApi->configurationImport: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**exportConfigurationDTO** | [**ExportConfigurationDTO**](ExportConfigurationDTO.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
**String**
|
||||
|
||||
### 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)
|
||||
|
||||
# **configurationUpdate**
|
||||
> ConfigurationDTO configurationUpdate(configurationDTO)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = ConfigurationApi();
|
||||
final configurationDTO = ConfigurationDTO(); // ConfigurationDTO |
|
||||
|
||||
try {
|
||||
final result = api_instance.configurationUpdate(configurationDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ConfigurationApi->configurationUpdate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**configurationDTO** | [**ConfigurationDTO**](ConfigurationDTO.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**ConfigurationDTO**](ConfigurationDTO.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
manager_api/doc/ConfigurationDTO.md
Normal file
23
manager_api/doc/ConfigurationDTO.md
Normal file
@ -0,0 +1,23 @@
|
||||
# managerapi.model.ConfigurationDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**label** | **String** | | [optional]
|
||||
**primaryColor** | **String** | | [optional]
|
||||
**secondaryColor** | **String** | | [optional]
|
||||
**languages** | **List<String>** | | [optional] [default to const []]
|
||||
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**isMobile** | **bool** | | [optional]
|
||||
**isTablet** | **bool** | | [optional]
|
||||
**isOffline** | **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)
|
||||
|
||||
|
||||
273
manager_api/doc/DeviceApi.md
Normal file
273
manager_api/doc/DeviceApi.md
Normal file
@ -0,0 +1,273 @@
|
||||
# managerapi.api.DeviceApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://localhost:5000*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**deviceCreate**](DeviceApi.md#devicecreate) | **POST** /api/Device |
|
||||
[**deviceDelete**](DeviceApi.md#devicedelete) | **DELETE** /api/Device/{id} |
|
||||
[**deviceGet**](DeviceApi.md#deviceget) | **GET** /api/Device |
|
||||
[**deviceGetDetail**](DeviceApi.md#devicegetdetail) | **GET** /api/Device/{id}/detail |
|
||||
[**deviceUpdate**](DeviceApi.md#deviceupdate) | **PUT** /api/Device |
|
||||
[**deviceUpdateMainInfos**](DeviceApi.md#deviceupdatemaininfos) | **PUT** /api/Device/mainInfos |
|
||||
|
||||
|
||||
# **deviceCreate**
|
||||
> DeviceDetailDTO deviceCreate(deviceDetailDTO)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/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 |
|
||||
|
||||
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)| |
|
||||
|
||||
### 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)
|
||||
|
||||
# **deviceDelete**
|
||||
> String deviceDelete(id)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = DeviceApi();
|
||||
final id = id_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.deviceDelete(id);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling DeviceApi->deviceDelete: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **String**| |
|
||||
|
||||
### 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)
|
||||
|
||||
# **deviceGet**
|
||||
> List<DeviceDTO> deviceGet()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = DeviceApi();
|
||||
|
||||
try {
|
||||
final result = api_instance.deviceGet();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling DeviceApi->deviceGet: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<DeviceDTO>**](DeviceDTO.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(id)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = DeviceApi();
|
||||
final id = id_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.deviceGetDetail(id);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling DeviceApi->deviceGetDetail: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **String**| |
|
||||
|
||||
### 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)
|
||||
|
||||
# **deviceUpdate**
|
||||
> DeviceDetailDTO deviceUpdate(deviceDetailDTO)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/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 |
|
||||
|
||||
try {
|
||||
final result = api_instance.deviceUpdate(deviceDetailDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling DeviceApi->deviceUpdate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**deviceDetailDTO** | [**DeviceDetailDTO**](DeviceDetailDTO.md)| |
|
||||
|
||||
### 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)
|
||||
|
||||
# **deviceUpdateMainInfos**
|
||||
> DeviceDTO deviceUpdateMainInfos(deviceDTO)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = DeviceApi();
|
||||
final deviceDTO = DeviceDTO(); // DeviceDTO |
|
||||
|
||||
try {
|
||||
final result = api_instance.deviceUpdateMainInfos(deviceDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling DeviceApi->deviceUpdateMainInfos: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**deviceDTO** | [**DeviceDTO**](DeviceDTO.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**DeviceDTO**](DeviceDTO.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)
|
||||
|
||||
24
manager_api/doc/DeviceDTO.md
Normal file
24
manager_api/doc/DeviceDTO.md
Normal file
@ -0,0 +1,24 @@
|
||||
# managerapi.model.DeviceDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**identifier** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**ipAddressWLAN** | **String** | | [optional]
|
||||
**ipAddressETH** | **String** | | [optional]
|
||||
**configurationId** | **String** | | [optional]
|
||||
**configuration** | **String** | | [optional]
|
||||
**connected** | **bool** | | [optional]
|
||||
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**dateUpdate** | [**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)
|
||||
|
||||
|
||||
28
manager_api/doc/DeviceDetailDTO.md
Normal file
28
manager_api/doc/DeviceDetailDTO.md
Normal file
@ -0,0 +1,28 @@
|
||||
# managerapi.model.DeviceDetailDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**identifier** | **String** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**ipAddressWLAN** | **String** | | [optional]
|
||||
**ipAddressETH** | **String** | | [optional]
|
||||
**configurationId** | **String** | | [optional]
|
||||
**configuration** | **String** | | [optional]
|
||||
**connected** | **bool** | | [optional]
|
||||
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**dateUpdate** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**connectionLevel** | **String** | | [optional]
|
||||
**lastConnectionLevel** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**batteryLevel** | **String** | | [optional]
|
||||
**lastBatteryLevel** | [**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)
|
||||
|
||||
|
||||
18
manager_api/doc/DeviceDetailDTOAllOf.md
Normal file
18
manager_api/doc/DeviceDetailDTOAllOf.md
Normal file
@ -0,0 +1,18 @@
|
||||
# managerapi.model.DeviceDetailDTOAllOf
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**connectionLevel** | **String** | | [optional]
|
||||
**lastConnectionLevel** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**batteryLevel** | **String** | | [optional]
|
||||
**lastBatteryLevel** | [**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)
|
||||
|
||||
|
||||
229
manager_api/doc/DisplayApi.md
Normal file
229
manager_api/doc/DisplayApi.md
Normal file
@ -0,0 +1,229 @@
|
||||
# managerapi.api.DisplayApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *https://localhost:44339*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**displayCreate**](DisplayApi.md#displaycreate) | **POST** /api/Display |
|
||||
[**displayDelete**](DisplayApi.md#displaydelete) | **DELETE** /api/Display/{id} |
|
||||
[**displayGet**](DisplayApi.md#displayget) | **GET** /api/Display |
|
||||
[**displayGetDetail**](DisplayApi.md#displaygetdetail) | **GET** /api/Display/{id} |
|
||||
[**displayUpdate**](DisplayApi.md#displayupdate) | **PUT** /api/Display |
|
||||
|
||||
|
||||
# **displayCreate**
|
||||
> RessourceDetailDTO displayCreate(displayDTO)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = DisplayApi();
|
||||
final displayDTO = DisplayDTO(); // DisplayDTO |
|
||||
|
||||
try {
|
||||
final result = api_instance.displayCreate(displayDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling DisplayApi->displayCreate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**displayDTO** | [**DisplayDTO**](DisplayDTO.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**RessourceDetailDTO**](RessourceDetailDTO.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)
|
||||
|
||||
# **displayDelete**
|
||||
> String displayDelete(id)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = DisplayApi();
|
||||
final id = id_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.displayDelete(id);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling DisplayApi->displayDelete: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **String**| |
|
||||
|
||||
### 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)
|
||||
|
||||
# **displayGet**
|
||||
> List<DisplayDTO> displayGet()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = DisplayApi();
|
||||
|
||||
try {
|
||||
final result = api_instance.displayGet();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling DisplayApi->displayGet: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<DisplayDTO>**](DisplayDTO.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)
|
||||
|
||||
# **displayGetDetail**
|
||||
> DisplayDTO displayGetDetail(id)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = DisplayApi();
|
||||
final id = id_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.displayGetDetail(id);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling DisplayApi->displayGetDetail: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **String**| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**DisplayDTO**](DisplayDTO.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)
|
||||
|
||||
# **displayUpdate**
|
||||
> DisplayDTO displayUpdate(displayDTO)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = DisplayApi();
|
||||
final displayDTO = DisplayDTO(); // DisplayDTO |
|
||||
|
||||
try {
|
||||
final result = api_instance.displayUpdate(displayDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling DisplayApi->displayUpdate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**displayDTO** | [**DisplayDTO**](DisplayDTO.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**DisplayDTO**](DisplayDTO.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)
|
||||
|
||||
21
manager_api/doc/DisplayDTO.md
Normal file
21
manager_api/doc/DisplayDTO.md
Normal file
@ -0,0 +1,21 @@
|
||||
# managerapi.model.DisplayDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**label** | **String** | | [optional]
|
||||
**sectionIds** | **List<String>** | | [optional] [default to const []]
|
||||
**primaryColor** | **String** | | [optional]
|
||||
**secondaryColor** | **String** | | [optional]
|
||||
**languages** | **List<String>** | | [optional] [default to const []]
|
||||
**dateCreation** | [**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)
|
||||
|
||||
|
||||
25
manager_api/doc/ExportConfigurationDTO.md
Normal file
25
manager_api/doc/ExportConfigurationDTO.md
Normal file
@ -0,0 +1,25 @@
|
||||
# managerapi.model.ExportConfigurationDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**label** | **String** | | [optional]
|
||||
**primaryColor** | **String** | | [optional]
|
||||
**secondaryColor** | **String** | | [optional]
|
||||
**languages** | **List<String>** | | [optional] [default to const []]
|
||||
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**isMobile** | **bool** | | [optional]
|
||||
**isTablet** | **bool** | | [optional]
|
||||
**isOffline** | **bool** | | [optional]
|
||||
**sections** | [**List<SectionDTO>**](SectionDTO.md) | | [optional] [default to const []]
|
||||
**resources** | [**List<ResourceDTO>**](ResourceDTO.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)
|
||||
|
||||
|
||||
16
manager_api/doc/ExportConfigurationDTOAllOf.md
Normal file
16
manager_api/doc/ExportConfigurationDTOAllOf.md
Normal file
@ -0,0 +1,16 @@
|
||||
# managerapi.model.ExportConfigurationDTOAllOf
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**sections** | [**List<SectionDTO>**](SectionDTO.md) | | [optional] [default to const []]
|
||||
**resources** | [**List<ResourceDTO>**](ResourceDTO.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)
|
||||
|
||||
|
||||
20
manager_api/doc/GeoPointDTO.md
Normal file
20
manager_api/doc/GeoPointDTO.md
Normal file
@ -0,0 +1,20 @@
|
||||
# managerapi.model.GeoPointDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **int** | | [optional]
|
||||
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||
**images** | [**List<ImageGeoPoint>**](ImageGeoPoint.md) | | [optional] [default to const []]
|
||||
**latitude** | **String** | | [optional]
|
||||
**longitude** | **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)
|
||||
|
||||
|
||||
19
manager_api/doc/ImageDTO.md
Normal file
19
manager_api/doc/ImageDTO.md
Normal file
@ -0,0 +1,19 @@
|
||||
# managerapi.model.ImageDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||
**resourceId** | **String** | | [optional]
|
||||
**source_** | **String** | | [optional]
|
||||
**order** | **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
manager_api/doc/ImageGeoPoint.md
Normal file
16
manager_api/doc/ImageGeoPoint.md
Normal file
@ -0,0 +1,16 @@
|
||||
# managerapi.model.ImageGeoPoint
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**imageResourceId** | **String** | | [optional]
|
||||
**imageSource** | **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)
|
||||
|
||||
|
||||
17
manager_api/doc/LevelDTO.md
Normal file
17
manager_api/doc/LevelDTO.md
Normal file
@ -0,0 +1,17 @@
|
||||
# managerapi.model.LevelDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||
**resourceId** | **String** | | [optional]
|
||||
**source_** | **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
manager_api/doc/LoginDTO.md
Normal file
16
manager_api/doc/LoginDTO.md
Normal file
@ -0,0 +1,16 @@
|
||||
# managerapi.model.LoginDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/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)
|
||||
|
||||
|
||||
19
manager_api/doc/MapDTO.md
Normal file
19
manager_api/doc/MapDTO.md
Normal file
@ -0,0 +1,19 @@
|
||||
# managerapi.model.MapDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**zoom** | **int** | | [optional]
|
||||
**mapType** | [**MapTypeApp**](MapTypeApp.md) | | [optional]
|
||||
**points** | [**List<GeoPointDTO>**](GeoPointDTO.md) | | [optional] [default to const []]
|
||||
**iconResourceId** | **String** | | [optional]
|
||||
**iconSource** | **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)
|
||||
|
||||
|
||||
14
manager_api/doc/MapType.md
Normal file
14
manager_api/doc/MapType.md
Normal file
@ -0,0 +1,14 @@
|
||||
# managerapi.model.MapType
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/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
manager_api/doc/MapTypeApp.md
Normal file
14
manager_api/doc/MapTypeApp.md
Normal file
@ -0,0 +1,14 @@
|
||||
# managerapi.model.MapTypeApp
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/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)
|
||||
|
||||
|
||||
15
manager_api/doc/MenuDTO.md
Normal file
15
manager_api/doc/MenuDTO.md
Normal file
@ -0,0 +1,15 @@
|
||||
# managerapi.model.MenuDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**sections** | [**List<SectionDTO>**](SectionDTO.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)
|
||||
|
||||
|
||||
16
manager_api/doc/PlayerMessageDTO.md
Normal file
16
manager_api/doc/PlayerMessageDTO.md
Normal file
@ -0,0 +1,16 @@
|
||||
# managerapi.model.PlayerMessageDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**configChanged** | **bool** | | [optional]
|
||||
**isDeleted** | **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)
|
||||
|
||||
|
||||
19
manager_api/doc/QuestionDTO.md
Normal file
19
manager_api/doc/QuestionDTO.md
Normal file
@ -0,0 +1,19 @@
|
||||
# managerapi.model.QuestionDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||
**responses** | [**List<ResponseDTO>**](ResponseDTO.md) | | [optional] [default to const []]
|
||||
**resourceId** | **String** | | [optional]
|
||||
**source_** | **String** | | [optional]
|
||||
**order** | **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)
|
||||
|
||||
|
||||
19
manager_api/doc/QuizzDTO.md
Normal file
19
manager_api/doc/QuizzDTO.md
Normal file
@ -0,0 +1,19 @@
|
||||
# managerapi.model.QuizzDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**questions** | [**List<QuestionDTO>**](QuestionDTO.md) | | [optional] [default to const []]
|
||||
**badLevel** | [**OneOfLevelDTO**](OneOfLevelDTO.md) | | [optional]
|
||||
**mediumLevel** | [**OneOfLevelDTO**](OneOfLevelDTO.md) | | [optional]
|
||||
**goodLevel** | [**OneOfLevelDTO**](OneOfLevelDTO.md) | | [optional]
|
||||
**greatLevel** | [**OneOfLevelDTO**](OneOfLevelDTO.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)
|
||||
|
||||
|
||||
319
manager_api/doc/ResourceApi.md
Normal file
319
manager_api/doc/ResourceApi.md
Normal file
@ -0,0 +1,319 @@
|
||||
# managerapi.api.ResourceApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://localhost:5000*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**resourceCreate**](ResourceApi.md#resourcecreate) | **POST** /api/Resource |
|
||||
[**resourceDelete**](ResourceApi.md#resourcedelete) | **DELETE** /api/Resource/{id} |
|
||||
[**resourceGet**](ResourceApi.md#resourceget) | **GET** /api/Resource |
|
||||
[**resourceGetDetail**](ResourceApi.md#resourcegetdetail) | **GET** /api/Resource/{id}/detail |
|
||||
[**resourceShow**](ResourceApi.md#resourceshow) | **GET** /api/Resource/{id} |
|
||||
[**resourceUpdate**](ResourceApi.md#resourceupdate) | **PUT** /api/Resource |
|
||||
[**resourceUpload**](ResourceApi.md#resourceupload) | **POST** /api/Resource/upload |
|
||||
|
||||
|
||||
# **resourceCreate**
|
||||
> ResourceDTO resourceCreate(resourceDTO)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = ResourceApi();
|
||||
final resourceDTO = ResourceDTO(); // ResourceDTO |
|
||||
|
||||
try {
|
||||
final result = api_instance.resourceCreate(resourceDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ResourceApi->resourceCreate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**resourceDTO** | [**ResourceDTO**](ResourceDTO.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**ResourceDTO**](ResourceDTO.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)
|
||||
|
||||
# **resourceDelete**
|
||||
> String resourceDelete(id)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = ResourceApi();
|
||||
final id = id_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.resourceDelete(id);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ResourceApi->resourceDelete: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **String**| |
|
||||
|
||||
### 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)
|
||||
|
||||
# **resourceGet**
|
||||
> List<ResourceDTO> resourceGet()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = ResourceApi();
|
||||
|
||||
try {
|
||||
final result = api_instance.resourceGet();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ResourceApi->resourceGet: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<ResourceDTO>**](ResourceDTO.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)
|
||||
|
||||
# **resourceGetDetail**
|
||||
> ResourceDTO resourceGetDetail(id)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = ResourceApi();
|
||||
final id = id_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.resourceGetDetail(id);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ResourceApi->resourceGetDetail: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **String**| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**ResourceDTO**](ResourceDTO.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)
|
||||
|
||||
# **resourceShow**
|
||||
> MultipartFile resourceShow(id)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = ResourceApi();
|
||||
final id = id_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.resourceShow(id);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ResourceApi->resourceShow: $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, 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)
|
||||
|
||||
# **resourceUpdate**
|
||||
> ResourceDTO resourceUpdate(resourceDTO)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = ResourceApi();
|
||||
final resourceDTO = ResourceDTO(); // ResourceDTO |
|
||||
|
||||
try {
|
||||
final result = api_instance.resourceUpdate(resourceDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ResourceApi->resourceUpdate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**resourceDTO** | [**ResourceDTO**](ResourceDTO.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**ResourceDTO**](ResourceDTO.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)
|
||||
|
||||
# **resourceUpload**
|
||||
> String resourceUpload(label, type)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = ResourceApi();
|
||||
final label = label_example; // String |
|
||||
final type = type_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.resourceUpload(label, type);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling ResourceApi->resourceUpload: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**label** | **String**| | [optional]
|
||||
**type** | **String**| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
**String**
|
||||
|
||||
### 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)
|
||||
|
||||
19
manager_api/doc/ResourceDTO.md
Normal file
19
manager_api/doc/ResourceDTO.md
Normal file
@ -0,0 +1,19 @@
|
||||
# managerapi.model.ResourceDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**type** | [**ResourceType**](ResourceType.md) | | [optional]
|
||||
**label** | **String** | | [optional]
|
||||
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**data** | **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)
|
||||
|
||||
|
||||
19
manager_api/doc/ResourceDetailDTO.md
Normal file
19
manager_api/doc/ResourceDetailDTO.md
Normal file
@ -0,0 +1,19 @@
|
||||
# managerapi.model.ResourceDetailDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**type** | [**ResourceType**](ResourceType.md) | | [optional]
|
||||
**label** | **String** | | [optional]
|
||||
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**data** | **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)
|
||||
|
||||
|
||||
14
manager_api/doc/ResourceType.md
Normal file
14
manager_api/doc/ResourceType.md
Normal file
@ -0,0 +1,14 @@
|
||||
# managerapi.model.ResourceType
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/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
manager_api/doc/ResponseDTO.md
Normal file
17
manager_api/doc/ResponseDTO.md
Normal file
@ -0,0 +1,17 @@
|
||||
# managerapi.model.ResponseDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||
**isGood** | **bool** | | [optional]
|
||||
**order** | **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)
|
||||
|
||||
|
||||
273
manager_api/doc/RessourceApi.md
Normal file
273
manager_api/doc/RessourceApi.md
Normal file
@ -0,0 +1,273 @@
|
||||
# managerapi.api.RessourceApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://192.168.31.96*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**ressourceCreate**](RessourceApi.md#ressourcecreate) | **POST** /api/Ressource |
|
||||
[**ressourceDelete**](RessourceApi.md#ressourcedelete) | **DELETE** /api/Ressource/{id} |
|
||||
[**ressourceGet**](RessourceApi.md#ressourceget) | **GET** /api/Ressource |
|
||||
[**ressourceGetDetail**](RessourceApi.md#ressourcegetdetail) | **GET** /api/Ressource/{id}/detail |
|
||||
[**ressourceShow**](RessourceApi.md#ressourceshow) | **GET** /api/Ressource/{id} |
|
||||
[**ressourceUpdate**](RessourceApi.md#ressourceupdate) | **PUT** /api/Ressource |
|
||||
|
||||
|
||||
# **ressourceCreate**
|
||||
> RessourceDetailDTO ressourceCreate(ressourceDetailDTO)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = RessourceApi();
|
||||
final ressourceDetailDTO = RessourceDetailDTO(); // RessourceDetailDTO |
|
||||
|
||||
try {
|
||||
final result = api_instance.ressourceCreate(ressourceDetailDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling RessourceApi->ressourceCreate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ressourceDetailDTO** | [**RessourceDetailDTO**](RessourceDetailDTO.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**RessourceDetailDTO**](RessourceDetailDTO.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)
|
||||
|
||||
# **ressourceDelete**
|
||||
> String ressourceDelete(id)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = RessourceApi();
|
||||
final id = id_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.ressourceDelete(id);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling RessourceApi->ressourceDelete: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **String**| |
|
||||
|
||||
### 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)
|
||||
|
||||
# **ressourceGet**
|
||||
> List<RessourceDTO> ressourceGet()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = RessourceApi();
|
||||
|
||||
try {
|
||||
final result = api_instance.ressourceGet();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling RessourceApi->ressourceGet: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<RessourceDTO>**](RessourceDTO.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)
|
||||
|
||||
# **ressourceGetDetail**
|
||||
> RessourceDetailDTO ressourceGetDetail(id)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = RessourceApi();
|
||||
final id = id_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.ressourceGetDetail(id);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling RessourceApi->ressourceGetDetail: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **String**| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**RessourceDetailDTO**](RessourceDetailDTO.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)
|
||||
|
||||
# **ressourceShow**
|
||||
> MultipartFile ressourceShow(id)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = RessourceApi();
|
||||
final id = id_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.ressourceShow(id);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling RessourceApi->ressourceShow: $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, 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)
|
||||
|
||||
# **ressourceUpdate**
|
||||
> RessourceDetailDTO ressourceUpdate(ressourceDetailDTO)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = RessourceApi();
|
||||
final ressourceDetailDTO = RessourceDetailDTO(); // RessourceDetailDTO |
|
||||
|
||||
try {
|
||||
final result = api_instance.ressourceUpdate(ressourceDetailDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling RessourceApi->ressourceUpdate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ressourceDetailDTO** | [**RessourceDetailDTO**](RessourceDetailDTO.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**RessourceDetailDTO**](RessourceDetailDTO.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)
|
||||
|
||||
17
manager_api/doc/RessourceDTO.md
Normal file
17
manager_api/doc/RessourceDTO.md
Normal file
@ -0,0 +1,17 @@
|
||||
# managerapi.model.RessourceDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**type** | [**RessourceType**](RessourceType.md) | | [optional]
|
||||
**label** | **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)
|
||||
|
||||
|
||||
19
manager_api/doc/RessourceDetailDTO.md
Normal file
19
manager_api/doc/RessourceDetailDTO.md
Normal file
@ -0,0 +1,19 @@
|
||||
# managerapi.model.RessourceDetailDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**type** | [**RessourceType**](RessourceType.md) | | [optional]
|
||||
**label** | **String** | | [optional]
|
||||
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**data** | **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)
|
||||
|
||||
|
||||
14
manager_api/doc/RessourceType.md
Normal file
14
manager_api/doc/RessourceType.md
Normal file
@ -0,0 +1,14 @@
|
||||
# managerapi.model.RessourceType
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/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)
|
||||
|
||||
|
||||
725
manager_api/doc/SectionApi.md
Normal file
725
manager_api/doc/SectionApi.md
Normal file
@ -0,0 +1,725 @@
|
||||
# managerapi.api.SectionApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://localhost:5000*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**sectionCreate**](SectionApi.md#sectioncreate) | **POST** /api/Section |
|
||||
[**sectionDelete**](SectionApi.md#sectiondelete) | **DELETE** /api/Section/{id} |
|
||||
[**sectionDeleteAllForConfiguration**](SectionApi.md#sectiondeleteallforconfiguration) | **DELETE** /api/Section/configuration/{id} |
|
||||
[**sectionGet**](SectionApi.md#sectionget) | **GET** /api/Section |
|
||||
[**sectionGetAllSectionSubSections**](SectionApi.md#sectiongetallsectionsubsections) | **GET** /api/Section/{id}/subsections |
|
||||
[**sectionGetArticleDTO**](SectionApi.md#sectiongetarticledto) | **GET** /api/Section/ArticleDTO |
|
||||
[**sectionGetDetail**](SectionApi.md#sectiongetdetail) | **GET** /api/Section/{id} |
|
||||
[**sectionGetFromConfiguration**](SectionApi.md#sectiongetfromconfiguration) | **GET** /api/Section/configuration/{id} |
|
||||
[**sectionGetMapDTO**](SectionApi.md#sectiongetmapdto) | **GET** /api/Section/MapDTO |
|
||||
[**sectionGetMenuDTO**](SectionApi.md#sectiongetmenudto) | **GET** /api/Section/MenuDTO |
|
||||
[**sectionGetQuizzDTO**](SectionApi.md#sectiongetquizzdto) | **GET** /api/Section/QuizzDTO |
|
||||
[**sectionGetSliderDTO**](SectionApi.md#sectiongetsliderdto) | **GET** /api/Section/SliderDTO |
|
||||
[**sectionGetVideoDTO**](SectionApi.md#sectiongetvideodto) | **GET** /api/Section/VideoDTO |
|
||||
[**sectionGetWebDTO**](SectionApi.md#sectiongetwebdto) | **GET** /api/Section/WebDTO |
|
||||
[**sectionPlayerMessageDTO**](SectionApi.md#sectionplayermessagedto) | **GET** /api/Section/PlayerMessageDTO |
|
||||
[**sectionUpdate**](SectionApi.md#sectionupdate) | **PUT** /api/Section |
|
||||
[**sectionUpdateOrder**](SectionApi.md#sectionupdateorder) | **PUT** /api/Section/order |
|
||||
|
||||
|
||||
# **sectionCreate**
|
||||
> SectionDTO sectionCreate(sectionDTO)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = SectionApi();
|
||||
final sectionDTO = SectionDTO(); // SectionDTO |
|
||||
|
||||
try {
|
||||
final result = api_instance.sectionCreate(sectionDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling SectionApi->sectionCreate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**sectionDTO** | [**SectionDTO**](SectionDTO.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**SectionDTO**](SectionDTO.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)
|
||||
|
||||
# **sectionDelete**
|
||||
> String sectionDelete(id)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = SectionApi();
|
||||
final id = id_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.sectionDelete(id);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling SectionApi->sectionDelete: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **String**| |
|
||||
|
||||
### 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)
|
||||
|
||||
# **sectionDeleteAllForConfiguration**
|
||||
> String sectionDeleteAllForConfiguration(id)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = SectionApi();
|
||||
final id = id_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.sectionDeleteAllForConfiguration(id);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling SectionApi->sectionDeleteAllForConfiguration: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **String**| |
|
||||
|
||||
### 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)
|
||||
|
||||
# **sectionGet**
|
||||
> List<SectionDTO> sectionGet()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = SectionApi();
|
||||
|
||||
try {
|
||||
final result = api_instance.sectionGet();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling SectionApi->sectionGet: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<SectionDTO>**](SectionDTO.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)
|
||||
|
||||
# **sectionGetAllSectionSubSections**
|
||||
> List<Object> sectionGetAllSectionSubSections(id)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = SectionApi();
|
||||
final id = id_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.sectionGetAllSectionSubSections(id);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling SectionApi->sectionGetAllSectionSubSections: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **String**| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Object>**](Object.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)
|
||||
|
||||
# **sectionGetArticleDTO**
|
||||
> ArticleDTO sectionGetArticleDTO()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = SectionApi();
|
||||
|
||||
try {
|
||||
final result = api_instance.sectionGetArticleDTO();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling SectionApi->sectionGetArticleDTO: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**ArticleDTO**](ArticleDTO.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)
|
||||
|
||||
# **sectionGetDetail**
|
||||
> SectionDTO sectionGetDetail(id)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = SectionApi();
|
||||
final id = id_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.sectionGetDetail(id);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling SectionApi->sectionGetDetail: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **String**| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**SectionDTO**](SectionDTO.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)
|
||||
|
||||
# **sectionGetFromConfiguration**
|
||||
> List<SectionDTO> sectionGetFromConfiguration(id)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = SectionApi();
|
||||
final id = id_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.sectionGetFromConfiguration(id);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling SectionApi->sectionGetFromConfiguration: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **String**| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<SectionDTO>**](SectionDTO.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)
|
||||
|
||||
# **sectionGetMapDTO**
|
||||
> MapDTO sectionGetMapDTO()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = SectionApi();
|
||||
|
||||
try {
|
||||
final result = api_instance.sectionGetMapDTO();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling SectionApi->sectionGetMapDTO: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**MapDTO**](MapDTO.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)
|
||||
|
||||
# **sectionGetMenuDTO**
|
||||
> MenuDTO sectionGetMenuDTO()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = SectionApi();
|
||||
|
||||
try {
|
||||
final result = api_instance.sectionGetMenuDTO();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling SectionApi->sectionGetMenuDTO: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**MenuDTO**](MenuDTO.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)
|
||||
|
||||
# **sectionGetQuizzDTO**
|
||||
> QuizzDTO sectionGetQuizzDTO()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = SectionApi();
|
||||
|
||||
try {
|
||||
final result = api_instance.sectionGetQuizzDTO();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling SectionApi->sectionGetQuizzDTO: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**QuizzDTO**](QuizzDTO.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)
|
||||
|
||||
# **sectionGetSliderDTO**
|
||||
> SliderDTO sectionGetSliderDTO()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = SectionApi();
|
||||
|
||||
try {
|
||||
final result = api_instance.sectionGetSliderDTO();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling SectionApi->sectionGetSliderDTO: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**SliderDTO**](SliderDTO.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)
|
||||
|
||||
# **sectionGetVideoDTO**
|
||||
> VideoDTO sectionGetVideoDTO()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = SectionApi();
|
||||
|
||||
try {
|
||||
final result = api_instance.sectionGetVideoDTO();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling SectionApi->sectionGetVideoDTO: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**VideoDTO**](VideoDTO.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)
|
||||
|
||||
# **sectionGetWebDTO**
|
||||
> WebDTO sectionGetWebDTO()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = SectionApi();
|
||||
|
||||
try {
|
||||
final result = api_instance.sectionGetWebDTO();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling SectionApi->sectionGetWebDTO: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**WebDTO**](WebDTO.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)
|
||||
|
||||
# **sectionPlayerMessageDTO**
|
||||
> PlayerMessageDTO sectionPlayerMessageDTO()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = SectionApi();
|
||||
|
||||
try {
|
||||
final result = api_instance.sectionPlayerMessageDTO();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling SectionApi->sectionPlayerMessageDTO: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**PlayerMessageDTO**](PlayerMessageDTO.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)
|
||||
|
||||
# **sectionUpdate**
|
||||
> SectionDTO sectionUpdate(sectionDTO)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = SectionApi();
|
||||
final sectionDTO = SectionDTO(); // SectionDTO |
|
||||
|
||||
try {
|
||||
final result = api_instance.sectionUpdate(sectionDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling SectionApi->sectionUpdate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**sectionDTO** | [**SectionDTO**](SectionDTO.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**SectionDTO**](SectionDTO.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)
|
||||
|
||||
# **sectionUpdateOrder**
|
||||
> String sectionUpdateOrder(sectionDTO)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = SectionApi();
|
||||
final sectionDTO = [List<SectionDTO>()]; // List<SectionDTO> |
|
||||
|
||||
try {
|
||||
final result = api_instance.sectionUpdateOrder(sectionDTO);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling SectionApi->sectionUpdateOrder: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**sectionDTO** | [**List<SectionDTO>**](SectionDTO.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
**String**
|
||||
|
||||
### 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)
|
||||
|
||||
27
manager_api/doc/SectionDTO.md
Normal file
27
manager_api/doc/SectionDTO.md
Normal file
@ -0,0 +1,27 @@
|
||||
# managerapi.model.SectionDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**label** | **String** | | [optional]
|
||||
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||
**imageId** | **String** | | [optional]
|
||||
**imageSource** | **String** | | [optional]
|
||||
**configurationId** | **String** | | [optional]
|
||||
**isSubSection** | **bool** | | [optional]
|
||||
**parentId** | **String** | | [optional]
|
||||
**type** | [**SectionType**](SectionType.md) | | [optional]
|
||||
**data** | **String** | | [optional]
|
||||
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**order** | **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
manager_api/doc/SectionType.md
Normal file
14
manager_api/doc/SectionType.md
Normal file
@ -0,0 +1,14 @@
|
||||
# managerapi.model.SectionType
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/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)
|
||||
|
||||
|
||||
15
manager_api/doc/SliderDTO.md
Normal file
15
manager_api/doc/SliderDTO.md
Normal file
@ -0,0 +1,15 @@
|
||||
# managerapi.model.SliderDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**images** | [**List<ImageDTO>**](ImageDTO.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)
|
||||
|
||||
|
||||
20
manager_api/doc/TokenDTO.md
Normal file
20
manager_api/doc/TokenDTO.md
Normal file
@ -0,0 +1,20 @@
|
||||
# managerapi.model.TokenDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**accessToken** | **String** | | [optional]
|
||||
**refreshToken** | **String** | | [optional]
|
||||
**scope** | **String** | | [optional]
|
||||
**tokenType** | **String** | | [optional]
|
||||
**expiresIn** | **int** | | [optional]
|
||||
**expiration** | [**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)
|
||||
|
||||
|
||||
16
manager_api/doc/TranslationDTO.md
Normal file
16
manager_api/doc/TranslationDTO.md
Normal file
@ -0,0 +1,16 @@
|
||||
# managerapi.model.TranslationDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**language** | **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)
|
||||
|
||||
|
||||
21
manager_api/doc/User.md
Normal file
21
manager_api/doc/User.md
Normal file
@ -0,0 +1,21 @@
|
||||
# managerapi.model.User
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
**email** | **String** | | [optional]
|
||||
**password** | **String** | | [optional]
|
||||
**firstName** | **String** | | [optional]
|
||||
**lastName** | **String** | | [optional]
|
||||
**token** | **String** | | [optional]
|
||||
**dateCreation** | [**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)
|
||||
|
||||
|
||||
229
manager_api/doc/UserApi.md
Normal file
229
manager_api/doc/UserApi.md
Normal file
@ -0,0 +1,229 @@
|
||||
# managerapi.api.UserApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://localhost:5000*
|
||||
|
||||
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 |
|
||||
[**userGetDetail**](UserApi.md#usergetdetail) | **GET** /api/User/{id} |
|
||||
[**userUpdateUser**](UserApi.md#userupdateuser) | **PUT** /api/User |
|
||||
|
||||
|
||||
# **userCreateUser**
|
||||
> UserDetailDTO userCreateUser(user)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = UserApi();
|
||||
final user = User(); // User |
|
||||
|
||||
try {
|
||||
final result = api_instance.userCreateUser(user);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling UserApi->userCreateUser: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**User**](User.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**UserDetailDTO**](UserDetailDTO.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**
|
||||
> String userDeleteUser(id)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/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
|
||||
|
||||
**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)
|
||||
|
||||
# **userGet**
|
||||
> List<User> userGet()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/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
|
||||
|
||||
[**List<User>**](User.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)
|
||||
|
||||
# **userGetDetail**
|
||||
> UserDetailDTO userGetDetail(id)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/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.userGetDetail(id);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling UserApi->userGetDetail: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **String**| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**UserDetailDTO**](UserDetailDTO.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**
|
||||
> UserDetailDTO userUpdateUser(user)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||
|
||||
final api_instance = UserApi();
|
||||
final user = User(); // User |
|
||||
|
||||
try {
|
||||
final result = api_instance.userUpdateUser(user);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling UserApi->userUpdateUser: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**User**](User.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**UserDetailDTO**](UserDetailDTO.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
manager_api/doc/UserDetailDTO.md
Normal file
18
manager_api/doc/UserDetailDTO.md
Normal file
@ -0,0 +1,18 @@
|
||||
# managerapi.model.UserDetailDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/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)
|
||||
|
||||
|
||||
15
manager_api/doc/VideoDTO.md
Normal file
15
manager_api/doc/VideoDTO.md
Normal file
@ -0,0 +1,15 @@
|
||||
# managerapi.model.VideoDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**source_** | **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)
|
||||
|
||||
|
||||
15
manager_api/doc/WebDTO.md
Normal file
15
manager_api/doc/WebDTO.md
Normal file
@ -0,0 +1,15 @@
|
||||
# managerapi.model.WebDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**source_** | **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)
|
||||
|
||||
|
||||
58
manager_api/git_push.sh
Normal file
58
manager_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'
|
||||
|
||||
76
manager_api/lib/api.dart
Normal file
76
manager_api/lib/api.dart
Normal file
@ -0,0 +1,76 @@
|
||||
//
|
||||
// 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/configuration_api.dart';
|
||||
part 'api/device_api.dart';
|
||||
part 'api/resource_api.dart';
|
||||
part 'api/section_api.dart';
|
||||
part 'api/user_api.dart';
|
||||
|
||||
part 'model/article_dto.dart';
|
||||
part 'model/configuration_dto.dart';
|
||||
part 'model/device_dto.dart';
|
||||
part 'model/device_detail_dto.dart';
|
||||
part 'model/device_detail_dto_all_of.dart';
|
||||
part 'model/export_configuration_dto.dart';
|
||||
part 'model/export_configuration_dto_all_of.dart';
|
||||
part 'model/geo_point_dto.dart';
|
||||
part 'model/image_dto.dart';
|
||||
part 'model/image_geo_point.dart';
|
||||
part 'model/level_dto.dart';
|
||||
part 'model/login_dto.dart';
|
||||
part 'model/map_dto.dart';
|
||||
part 'model/map_type_app.dart';
|
||||
part 'model/menu_dto.dart';
|
||||
part 'model/player_message_dto.dart';
|
||||
part 'model/question_dto.dart';
|
||||
part 'model/quizz_dto.dart';
|
||||
part 'model/resource_dto.dart';
|
||||
part 'model/resource_type.dart';
|
||||
part 'model/response_dto.dart';
|
||||
part 'model/section_dto.dart';
|
||||
part 'model/section_type.dart';
|
||||
part 'model/slider_dto.dart';
|
||||
part 'model/token_dto.dart';
|
||||
part 'model/translation_dto.dart';
|
||||
part 'model/user.dart';
|
||||
part 'model/user_detail_dto.dart';
|
||||
part 'model/video_dto.dart';
|
||||
part 'model/web_dto.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();
|
||||
191
manager_api/lib/api/authentication_api.dart
Normal file
191
manager_api/lib/api/authentication_api.dart
Normal file
@ -0,0 +1,191 @@
|
||||
//
|
||||
// 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;
|
||||
|
||||
/// Performs an HTTP 'POST /api/Authentication/Token' operation and returns the [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,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] grantType:
|
||||
///
|
||||
/// * [String] username:
|
||||
///
|
||||
/// * [String] password:
|
||||
///
|
||||
/// * [String] clientId:
|
||||
///
|
||||
/// * [String] clientSecret:
|
||||
Future<TokenDTO> 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), 'TokenDTO') as TokenDTO;
|
||||
}
|
||||
return Future<TokenDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'POST /api/Authentication/Authenticate' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [LoginDTO] loginDTO (required):
|
||||
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,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [LoginDTO] loginDTO (required):
|
||||
Future<TokenDTO> 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), 'TokenDTO') as TokenDTO;
|
||||
}
|
||||
return Future<TokenDTO>.value(null);
|
||||
}
|
||||
}
|
||||
452
manager_api/lib/api/configuration_api.dart
Normal file
452
manager_api/lib/api/configuration_api.dart
Normal file
@ -0,0 +1,452 @@
|
||||
//
|
||||
// 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 ConfigurationApi {
|
||||
ConfigurationApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Performs an HTTP 'POST /api/Configuration' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [ConfigurationDTO] configurationDTO (required):
|
||||
Future<Response> configurationCreateWithHttpInfo(ConfigurationDTO configurationDTO) async {
|
||||
// Verify required params are set.
|
||||
if (configurationDTO == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: configurationDTO');
|
||||
}
|
||||
|
||||
final path = r'/api/Configuration';
|
||||
|
||||
Object postBody = configurationDTO;
|
||||
|
||||
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:
|
||||
///
|
||||
/// * [ConfigurationDTO] configurationDTO (required):
|
||||
Future<ConfigurationDTO> configurationCreate(ConfigurationDTO configurationDTO) async {
|
||||
final response = await configurationCreateWithHttpInfo(configurationDTO);
|
||||
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), 'ConfigurationDTO') as ConfigurationDTO;
|
||||
}
|
||||
return Future<ConfigurationDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'DELETE /api/Configuration/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> configurationDeleteWithHttpInfo(String id) async {
|
||||
// Verify required params are set.
|
||||
if (id == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: id');
|
||||
}
|
||||
|
||||
final path = r'/api/Configuration/{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<String> configurationDelete(String id) async {
|
||||
final response = await configurationDeleteWithHttpInfo(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), 'String') as String;
|
||||
}
|
||||
return Future<String>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/Configuration/{id}/export' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> configurationExportWithHttpInfo(String id) async {
|
||||
// Verify required params are set.
|
||||
if (id == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: id');
|
||||
}
|
||||
|
||||
final path = r'/api/Configuration/{id}/export'
|
||||
.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<ExportConfigurationDTO> configurationExport(String id) async {
|
||||
final response = await configurationExportWithHttpInfo(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), 'ExportConfigurationDTO') as ExportConfigurationDTO;
|
||||
}
|
||||
return Future<ExportConfigurationDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/Configuration' operation and returns the [Response].
|
||||
Future<Response> configurationGetWithHttpInfo() async {
|
||||
final path = r'/api/Configuration';
|
||||
|
||||
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<ConfigurationDTO>> configurationGet() async {
|
||||
final response = await configurationGetWithHttpInfo();
|
||||
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<ConfigurationDTO>') as List)
|
||||
.cast<ConfigurationDTO>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<ConfigurationDTO>>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/Configuration/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> configurationGetDetailWithHttpInfo(String id) async {
|
||||
// Verify required params are set.
|
||||
if (id == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: id');
|
||||
}
|
||||
|
||||
final path = r'/api/Configuration/{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<ConfigurationDTO> configurationGetDetail(String id) async {
|
||||
final response = await configurationGetDetailWithHttpInfo(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), 'ConfigurationDTO') as ConfigurationDTO;
|
||||
}
|
||||
return Future<ConfigurationDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'POST /api/Configuration/import' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [ExportConfigurationDTO] exportConfigurationDTO (required):
|
||||
Future<Response> configurationImportWithHttpInfo(ExportConfigurationDTO exportConfigurationDTO) async {
|
||||
// Verify required params are set.
|
||||
if (exportConfigurationDTO == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: exportConfigurationDTO');
|
||||
}
|
||||
|
||||
final path = r'/api/Configuration/import';
|
||||
|
||||
Object postBody = exportConfigurationDTO;
|
||||
|
||||
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:
|
||||
///
|
||||
/// * [ExportConfigurationDTO] exportConfigurationDTO (required):
|
||||
Future<String> configurationImport(ExportConfigurationDTO exportConfigurationDTO) async {
|
||||
final response = await configurationImportWithHttpInfo(exportConfigurationDTO);
|
||||
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), 'String') as String;
|
||||
}
|
||||
return Future<String>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'PUT /api/Configuration' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [ConfigurationDTO] configurationDTO (required):
|
||||
Future<Response> configurationUpdateWithHttpInfo(ConfigurationDTO configurationDTO) async {
|
||||
// Verify required params are set.
|
||||
if (configurationDTO == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: configurationDTO');
|
||||
}
|
||||
|
||||
final path = r'/api/Configuration';
|
||||
|
||||
Object postBody = configurationDTO;
|
||||
|
||||
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:
|
||||
///
|
||||
/// * [ConfigurationDTO] configurationDTO (required):
|
||||
Future<ConfigurationDTO> configurationUpdate(ConfigurationDTO configurationDTO) async {
|
||||
final response = await configurationUpdateWithHttpInfo(configurationDTO);
|
||||
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), 'ConfigurationDTO') as ConfigurationDTO;
|
||||
}
|
||||
return Future<ConfigurationDTO>.value(null);
|
||||
}
|
||||
}
|
||||
388
manager_api/lib/api/device_api.dart
Normal file
388
manager_api/lib/api/device_api.dart
Normal file
@ -0,0 +1,388 @@
|
||||
//
|
||||
// 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;
|
||||
|
||||
/// Performs an HTTP 'POST /api/Device' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [DeviceDetailDTO] deviceDetailDTO (required):
|
||||
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,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [DeviceDetailDTO] deviceDetailDTO (required):
|
||||
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);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'DELETE /api/Device/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> deviceDeleteWithHttpInfo(String id) async {
|
||||
// Verify required params are set.
|
||||
if (id == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: id');
|
||||
}
|
||||
|
||||
final path = r'/api/Device/{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<String> deviceDelete(String id) async {
|
||||
final response = await deviceDeleteWithHttpInfo(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), 'String') as String;
|
||||
}
|
||||
return Future<String>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/Device' operation and returns the [Response].
|
||||
Future<Response> deviceGetWithHttpInfo() async {
|
||||
final path = r'/api/Device';
|
||||
|
||||
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<DeviceDTO>> deviceGet() async {
|
||||
final response = await deviceGetWithHttpInfo();
|
||||
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<DeviceDTO>') as List)
|
||||
.cast<DeviceDTO>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<DeviceDTO>>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/Device/{id}/detail' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> deviceGetDetailWithHttpInfo(String id) async {
|
||||
// Verify required params are set.
|
||||
if (id == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: id');
|
||||
}
|
||||
|
||||
final path = r'/api/Device/{id}/detail'
|
||||
.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<DeviceDetailDTO> deviceGetDetail(String id) async {
|
||||
final response = await deviceGetDetailWithHttpInfo(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), 'DeviceDetailDTO') as DeviceDetailDTO;
|
||||
}
|
||||
return Future<DeviceDetailDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'PUT /api/Device' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [DeviceDetailDTO] deviceDetailDTO (required):
|
||||
Future<Response> deviceUpdateWithHttpInfo(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,
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [DeviceDetailDTO] deviceDetailDTO (required):
|
||||
Future<DeviceDetailDTO> deviceUpdate(DeviceDetailDTO deviceDetailDTO) async {
|
||||
final response = await deviceUpdateWithHttpInfo(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);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'PUT /api/Device/mainInfos' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [DeviceDTO] deviceDTO (required):
|
||||
Future<Response> deviceUpdateMainInfosWithHttpInfo(DeviceDTO deviceDTO) async {
|
||||
// Verify required params are set.
|
||||
if (deviceDTO == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: deviceDTO');
|
||||
}
|
||||
|
||||
final path = r'/api/Device/mainInfos';
|
||||
|
||||
Object postBody = deviceDTO;
|
||||
|
||||
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:
|
||||
///
|
||||
/// * [DeviceDTO] deviceDTO (required):
|
||||
Future<DeviceDTO> deviceUpdateMainInfos(DeviceDTO deviceDTO) async {
|
||||
final response = await deviceUpdateMainInfosWithHttpInfo(deviceDTO);
|
||||
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), 'DeviceDTO') as DeviceDTO;
|
||||
}
|
||||
return Future<DeviceDTO>.value(null);
|
||||
}
|
||||
}
|
||||
467
manager_api/lib/api/resource_api.dart
Normal file
467
manager_api/lib/api/resource_api.dart
Normal file
@ -0,0 +1,467 @@
|
||||
//
|
||||
// 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 ResourceApi {
|
||||
ResourceApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Performs an HTTP 'POST /api/Resource' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [ResourceDTO] resourceDTO (required):
|
||||
Future<Response> resourceCreateWithHttpInfo(ResourceDTO resourceDTO) async {
|
||||
// Verify required params are set.
|
||||
if (resourceDTO == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: resourceDTO');
|
||||
}
|
||||
|
||||
final path = r'/api/Resource';
|
||||
|
||||
Object postBody = resourceDTO;
|
||||
|
||||
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:
|
||||
///
|
||||
/// * [ResourceDTO] resourceDTO (required):
|
||||
Future<ResourceDTO> resourceCreate(ResourceDTO resourceDTO) async {
|
||||
final response = await resourceCreateWithHttpInfo(resourceDTO);
|
||||
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), 'ResourceDTO') as ResourceDTO;
|
||||
}
|
||||
return Future<ResourceDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'DELETE /api/Resource/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> resourceDeleteWithHttpInfo(String id) async {
|
||||
// Verify required params are set.
|
||||
if (id == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: id');
|
||||
}
|
||||
|
||||
final path = r'/api/Resource/{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<String> resourceDelete(String id) async {
|
||||
final response = await resourceDeleteWithHttpInfo(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), 'String') as String;
|
||||
}
|
||||
return Future<String>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/Resource' operation and returns the [Response].
|
||||
Future<Response> resourceGetWithHttpInfo() async {
|
||||
final path = r'/api/Resource';
|
||||
|
||||
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<ResourceDTO>> resourceGet() async {
|
||||
final response = await resourceGetWithHttpInfo();
|
||||
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<ResourceDTO>') as List)
|
||||
.cast<ResourceDTO>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<ResourceDTO>>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/Resource/{id}/detail' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> resourceGetDetailWithHttpInfo(String id) async {
|
||||
// Verify required params are set.
|
||||
if (id == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: id');
|
||||
}
|
||||
|
||||
final path = r'/api/Resource/{id}/detail'
|
||||
.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<ResourceDTO> resourceGetDetail(String id) async {
|
||||
final response = await resourceGetDetailWithHttpInfo(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), 'ResourceDTO') as ResourceDTO;
|
||||
}
|
||||
return Future<ResourceDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/Resource/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> resourceShowWithHttpInfo(String id) async {
|
||||
// Verify required params are set.
|
||||
if (id == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: id');
|
||||
}
|
||||
|
||||
final path = r'/api/Resource/{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<MultipartFile> resourceShow(String id) async {
|
||||
final response = await resourceShowWithHttpInfo(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 'PUT /api/Resource' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [ResourceDTO] resourceDTO (required):
|
||||
Future<Response> resourceUpdateWithHttpInfo(ResourceDTO resourceDTO) async {
|
||||
// Verify required params are set.
|
||||
if (resourceDTO == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: resourceDTO');
|
||||
}
|
||||
|
||||
final path = r'/api/Resource';
|
||||
|
||||
Object postBody = resourceDTO;
|
||||
|
||||
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:
|
||||
///
|
||||
/// * [ResourceDTO] resourceDTO (required):
|
||||
Future<ResourceDTO> resourceUpdate(ResourceDTO resourceDTO) async {
|
||||
final response = await resourceUpdateWithHttpInfo(resourceDTO);
|
||||
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), 'ResourceDTO') as ResourceDTO;
|
||||
}
|
||||
return Future<ResourceDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'POST /api/Resource/upload' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] label:
|
||||
///
|
||||
/// * [String] type:
|
||||
Future<Response> resourceUploadWithHttpInfo({ String label, String type }) async {
|
||||
// Verify required params are set.
|
||||
|
||||
final path = r'/api/Resource/upload';
|
||||
|
||||
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 (label != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'label'] = parameterToString(label);
|
||||
}
|
||||
if (type != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'type'] = parameterToString(type);
|
||||
}
|
||||
if (hasFields) {
|
||||
postBody = mp;
|
||||
}
|
||||
} else {
|
||||
if (label != null) {
|
||||
formParams[r'label'] = parameterToString(label);
|
||||
}
|
||||
if (type != null) {
|
||||
formParams[r'type'] = parameterToString(type);
|
||||
}
|
||||
}
|
||||
|
||||
return await apiClient.invokeAPI(
|
||||
path,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
nullableContentType,
|
||||
authNames,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] label:
|
||||
///
|
||||
/// * [String] type:
|
||||
Future<String> resourceUpload({ String label, String type }) async {
|
||||
final response = await resourceUploadWithHttpInfo( label: label, type: 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), 'String') as String;
|
||||
}
|
||||
return Future<String>.value(null);
|
||||
}
|
||||
}
|
||||
389
manager_api/lib/api/ressource_api.dart
Normal file
389
manager_api/lib/api/ressource_api.dart
Normal file
@ -0,0 +1,389 @@
|
||||
//
|
||||
// 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 RessourceApi {
|
||||
RessourceApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Performs an HTTP 'POST /api/Ressource' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [RessourceDetailDTO] ressourceDetailDTO (required):
|
||||
Future<Response> ressourceCreateWithHttpInfo(RessourceDetailDTO ressourceDetailDTO) async {
|
||||
// Verify required params are set.
|
||||
if (ressourceDetailDTO == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: ressourceDetailDTO');
|
||||
}
|
||||
|
||||
final path = r'/api/Ressource';
|
||||
|
||||
Object postBody = ressourceDetailDTO;
|
||||
|
||||
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:
|
||||
///
|
||||
/// * [RessourceDetailDTO] ressourceDetailDTO (required):
|
||||
Future<RessourceDetailDTO> ressourceCreate(RessourceDetailDTO ressourceDetailDTO) async {
|
||||
final response = await ressourceCreateWithHttpInfo(ressourceDetailDTO);
|
||||
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), 'RessourceDetailDTO') as RessourceDetailDTO;
|
||||
}
|
||||
return Future<RessourceDetailDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'DELETE /api/Ressource/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> ressourceDeleteWithHttpInfo(String id) async {
|
||||
// Verify required params are set.
|
||||
if (id == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: id');
|
||||
}
|
||||
|
||||
final path = r'/api/Ressource/{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<String> ressourceDelete(String id) async {
|
||||
final response = await ressourceDeleteWithHttpInfo(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), 'String') as String;
|
||||
}
|
||||
return Future<String>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/Ressource' operation and returns the [Response].
|
||||
Future<Response> ressourceGetWithHttpInfo() async {
|
||||
final path = r'/api/Ressource';
|
||||
|
||||
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<RessourceDTO>> ressourceGet() async {
|
||||
final response = await ressourceGetWithHttpInfo();
|
||||
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<RessourceDTO>') as List)
|
||||
.cast<RessourceDTO>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<RessourceDTO>>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/Ressource/{id}/detail' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> ressourceGetDetailWithHttpInfo(String id) async {
|
||||
// Verify required params are set.
|
||||
if (id == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: id');
|
||||
}
|
||||
|
||||
final path = r'/api/Ressource/{id}/detail'
|
||||
.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<RessourceDetailDTO> ressourceGetDetail(String id) async {
|
||||
final response = await ressourceGetDetailWithHttpInfo(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), 'RessourceDetailDTO') as RessourceDetailDTO;
|
||||
}
|
||||
return Future<RessourceDetailDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/Ressource/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> ressourceShowWithHttpInfo(String id) async {
|
||||
// Verify required params are set.
|
||||
if (id == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: id');
|
||||
}
|
||||
|
||||
final path = r'/api/Ressource/{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<MultipartFile> ressourceShow(String id) async {
|
||||
final response = await ressourceShowWithHttpInfo(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 'PUT /api/Ressource' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [RessourceDetailDTO] ressourceDetailDTO (required):
|
||||
Future<Response> ressourceUpdateWithHttpInfo(RessourceDetailDTO ressourceDetailDTO) async {
|
||||
// Verify required params are set.
|
||||
if (ressourceDetailDTO == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: ressourceDetailDTO');
|
||||
}
|
||||
|
||||
final path = r'/api/Ressource';
|
||||
|
||||
Object postBody = ressourceDetailDTO;
|
||||
|
||||
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:
|
||||
///
|
||||
/// * [RessourceDetailDTO] ressourceDetailDTO (required):
|
||||
Future<RessourceDetailDTO> ressourceUpdate(RessourceDetailDTO ressourceDetailDTO) async {
|
||||
final response = await ressourceUpdateWithHttpInfo(ressourceDetailDTO);
|
||||
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), 'RessourceDetailDTO') as RessourceDetailDTO;
|
||||
}
|
||||
return Future<RessourceDetailDTO>.value(null);
|
||||
}
|
||||
}
|
||||
1000
manager_api/lib/api/section_api.dart
Normal file
1000
manager_api/lib/api/section_api.dart
Normal file
File diff suppressed because it is too large
Load Diff
325
manager_api/lib/api/user_api.dart
Normal file
325
manager_api/lib/api/user_api.dart
Normal file
@ -0,0 +1,325 @@
|
||||
//
|
||||
// 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 UserApi {
|
||||
UserApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Performs an HTTP 'POST /api/User' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [User] user (required):
|
||||
Future<Response> userCreateUserWithHttpInfo(User user) async {
|
||||
// Verify required params are set.
|
||||
if (user == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: user');
|
||||
}
|
||||
|
||||
final path = r'/api/User';
|
||||
|
||||
Object postBody = user;
|
||||
|
||||
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:
|
||||
///
|
||||
/// * [User] user (required):
|
||||
Future<UserDetailDTO> userCreateUser(User user) async {
|
||||
final response = await userCreateUserWithHttpInfo(user);
|
||||
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), 'UserDetailDTO') as UserDetailDTO;
|
||||
}
|
||||
return Future<UserDetailDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'DELETE /api/User/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> userDeleteUserWithHttpInfo(String id) async {
|
||||
// Verify required params are set.
|
||||
if (id == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: id');
|
||||
}
|
||||
|
||||
final path = r'/api/User/{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<String> userDeleteUser(String id) async {
|
||||
final response = await userDeleteUserWithHttpInfo(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), 'String') as String;
|
||||
}
|
||||
return Future<String>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/User' operation and returns the [Response].
|
||||
Future<Response> userGetWithHttpInfo() async {
|
||||
final path = r'/api/User';
|
||||
|
||||
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<User>> userGet() async {
|
||||
final response = await userGetWithHttpInfo();
|
||||
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<User>') as List)
|
||||
.cast<User>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<User>>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/User/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> userGetDetailWithHttpInfo(String id) async {
|
||||
// Verify required params are set.
|
||||
if (id == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: id');
|
||||
}
|
||||
|
||||
final path = r'/api/User/{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<UserDetailDTO> userGetDetail(String id) async {
|
||||
final response = await userGetDetailWithHttpInfo(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), 'UserDetailDTO') as UserDetailDTO;
|
||||
}
|
||||
return Future<UserDetailDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'PUT /api/User' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [User] user (required):
|
||||
Future<Response> userUpdateUserWithHttpInfo(User user) async {
|
||||
// Verify required params are set.
|
||||
if (user == null) {
|
||||
throw ApiException(HttpStatus.badRequest, 'Missing required param: user');
|
||||
}
|
||||
|
||||
final path = r'/api/User';
|
||||
|
||||
Object postBody = user;
|
||||
|
||||
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:
|
||||
///
|
||||
/// * [User] user (required):
|
||||
Future<UserDetailDTO> userUpdateUser(User user) async {
|
||||
final response = await userUpdateUserWithHttpInfo(user);
|
||||
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), 'UserDetailDTO') as UserDetailDTO;
|
||||
}
|
||||
return Future<UserDetailDTO>.value(null);
|
||||
}
|
||||
}
|
||||
277
manager_api/lib/api_client.dart
Normal file
277
manager_api/lib/api_client.dart
Normal file
@ -0,0 +1,277 @@
|
||||
//
|
||||
// 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 ApiClient {
|
||||
ApiClient({this.basePath = 'http://localhost:5000'}) {
|
||||
// Setup authentications (key: authentication name, value: authentication).
|
||||
_authentications[r'bearer'] = OAuth();
|
||||
}
|
||||
|
||||
final String basePath;
|
||||
|
||||
var _client = Client();
|
||||
|
||||
/// Returns the current HTTP [Client] instance to use in this class.
|
||||
///
|
||||
/// The return value is guaranteed to never be null.
|
||||
Client get client => _client;
|
||||
|
||||
/// Requests to use a new HTTP [Client] in this class.
|
||||
///
|
||||
/// If the [newClient] is null, an [ArgumentError] is thrown.
|
||||
set client(Client newClient) {
|
||||
if (newClient == null) {
|
||||
throw ArgumentError('New client instance cannot be null.');
|
||||
}
|
||||
_client = newClient;
|
||||
}
|
||||
|
||||
final _defaultHeaderMap = <String, String>{};
|
||||
final _authentications = <String, Authentication>{};
|
||||
|
||||
void addDefaultHeader(String key, String value) {
|
||||
_defaultHeaderMap[key] = value;
|
||||
}
|
||||
|
||||
Map<String,String> get defaultHeaderMap => _defaultHeaderMap;
|
||||
|
||||
/// returns an unmodifiable view of the authentications, since none should be added
|
||||
/// nor deleted
|
||||
Map<String, Authentication> get authentications =>
|
||||
Map.unmodifiable(_authentications);
|
||||
|
||||
T getAuthentication<T extends Authentication>(String name) {
|
||||
final authentication = _authentications[name];
|
||||
return authentication is T ? authentication : null;
|
||||
}
|
||||
|
||||
// We don’t use a Map<String, String> for queryParams.
|
||||
// If collectionFormat is 'multi', a key might appear multiple times.
|
||||
Future<Response> invokeAPI(
|
||||
String path,
|
||||
String method,
|
||||
Iterable<QueryParam> queryParams,
|
||||
Object body,
|
||||
Map<String, String> headerParams,
|
||||
Map<String, String> formParams,
|
||||
String nullableContentType,
|
||||
List<String> authNames,
|
||||
) async {
|
||||
_updateParamsForAuth(authNames, queryParams, headerParams);
|
||||
|
||||
headerParams.addAll(_defaultHeaderMap);
|
||||
|
||||
final urlEncodedQueryParams = queryParams
|
||||
.where((param) => param.value != null)
|
||||
.map((param) => '$param');
|
||||
|
||||
final queryString = urlEncodedQueryParams.isNotEmpty
|
||||
? '?${urlEncodedQueryParams.join('&')}'
|
||||
: '';
|
||||
|
||||
final url = '$basePath$path$queryString';
|
||||
|
||||
if (nullableContentType != null) {
|
||||
headerParams['Content-Type'] = nullableContentType;
|
||||
}
|
||||
|
||||
try {
|
||||
// Special case for uploading a single file which isn’t a 'multipart/form-data'.
|
||||
if (
|
||||
body is MultipartFile && (nullableContentType == null ||
|
||||
!nullableContentType.toLowerCase().startsWith('multipart/form-data'))
|
||||
) {
|
||||
final request = StreamedRequest(method, Uri.parse(url));
|
||||
request.headers.addAll(headerParams);
|
||||
request.contentLength = body.length;
|
||||
body.finalize().listen(
|
||||
request.sink.add,
|
||||
onDone: request.sink.close,
|
||||
onError: (error, trace) => request.sink.close(),
|
||||
cancelOnError: true,
|
||||
);
|
||||
final response = await _client.send(request);
|
||||
return Response.fromStream(response);
|
||||
}
|
||||
|
||||
if (body is MultipartRequest) {
|
||||
final request = MultipartRequest(method, Uri.parse(url));
|
||||
request.fields.addAll(body.fields);
|
||||
request.files.addAll(body.files);
|
||||
request.headers.addAll(body.headers);
|
||||
request.headers.addAll(headerParams);
|
||||
final response = await _client.send(request);
|
||||
return Response.fromStream(response);
|
||||
}
|
||||
|
||||
final msgBody = nullableContentType == 'application/x-www-form-urlencoded'
|
||||
? formParams
|
||||
: serialize(body);
|
||||
final nullableHeaderParams = headerParams.isEmpty ? null : headerParams;
|
||||
|
||||
switch(method) {
|
||||
case 'POST': return await _client.post(url, headers: nullableHeaderParams, body: msgBody,);
|
||||
case 'PUT': return await _client.put(url, headers: nullableHeaderParams, body: msgBody,);
|
||||
case 'DELETE': return await _client.delete(url, headers: nullableHeaderParams,);
|
||||
case 'PATCH': return await _client.patch(url, headers: nullableHeaderParams, body: msgBody,);
|
||||
case 'HEAD': return await _client.head(url, headers: nullableHeaderParams,);
|
||||
case 'GET': return await _client.get(url, headers: nullableHeaderParams,);
|
||||
}
|
||||
} on SocketException catch (e, trace) {
|
||||
throw ApiException.withInner(HttpStatus.badRequest, 'Socket operation failed: $method $path', e, trace,);
|
||||
} on TlsException catch (e, trace) {
|
||||
throw ApiException.withInner(HttpStatus.badRequest, 'TLS/SSL communication failed: $method $path', e, trace,);
|
||||
} on IOException catch (e, trace) {
|
||||
throw ApiException.withInner(HttpStatus.badRequest, 'I/O operation failed: $method $path', e, trace,);
|
||||
} on ClientException catch (e, trace) {
|
||||
throw ApiException.withInner(HttpStatus.badRequest, 'HTTP connection failed: $method $path', e, trace,);
|
||||
} on Exception catch (e, trace) {
|
||||
throw ApiException.withInner(HttpStatus.badRequest, 'Exception occurred: $method $path', e, trace,);
|
||||
}
|
||||
|
||||
throw ApiException(HttpStatus.badRequest, 'Invalid HTTP operation: $method $path',);
|
||||
}
|
||||
|
||||
dynamic _deserialize(dynamic value, String targetType, {bool growable}) {
|
||||
try {
|
||||
switch (targetType) {
|
||||
case 'String':
|
||||
return '$value';
|
||||
case 'int':
|
||||
return value is int ? value : int.parse('$value');
|
||||
case 'bool':
|
||||
if (value is bool) {
|
||||
return value;
|
||||
}
|
||||
final valueString = '$value'.toLowerCase();
|
||||
return valueString == 'true' || valueString == '1';
|
||||
break;
|
||||
case 'double':
|
||||
return value is double ? value : double.parse('$value');
|
||||
case 'ArticleDTO':
|
||||
return ArticleDTO.fromJson(value);
|
||||
case 'ConfigurationDTO':
|
||||
return ConfigurationDTO.fromJson(value);
|
||||
case 'DeviceDTO':
|
||||
return DeviceDTO.fromJson(value);
|
||||
case 'DeviceDetailDTO':
|
||||
return DeviceDetailDTO.fromJson(value);
|
||||
case 'DeviceDetailDTOAllOf':
|
||||
return DeviceDetailDTOAllOf.fromJson(value);
|
||||
case 'ExportConfigurationDTO':
|
||||
return ExportConfigurationDTO.fromJson(value);
|
||||
case 'ExportConfigurationDTOAllOf':
|
||||
return ExportConfigurationDTOAllOf.fromJson(value);
|
||||
case 'GeoPointDTO':
|
||||
return GeoPointDTO.fromJson(value);
|
||||
case 'ImageDTO':
|
||||
return ImageDTO.fromJson(value);
|
||||
case 'ImageGeoPoint':
|
||||
return ImageGeoPoint.fromJson(value);
|
||||
case 'LevelDTO':
|
||||
return LevelDTO.fromJson(value);
|
||||
case 'LoginDTO':
|
||||
return LoginDTO.fromJson(value);
|
||||
case 'MapDTO':
|
||||
return MapDTO.fromJson(value);
|
||||
case 'MapTypeApp':
|
||||
return MapTypeAppTypeTransformer().decode(value);
|
||||
|
||||
case 'MenuDTO':
|
||||
return MenuDTO.fromJson(value);
|
||||
case 'PlayerMessageDTO':
|
||||
return PlayerMessageDTO.fromJson(value);
|
||||
case 'QuestionDTO':
|
||||
return QuestionDTO.fromJson(value);
|
||||
case 'QuizzDTO':
|
||||
return QuizzDTO.fromJson(value);
|
||||
case 'ResourceDTO':
|
||||
return ResourceDTO.fromJson(value);
|
||||
case 'ResourceType':
|
||||
return ResourceTypeTypeTransformer().decode(value);
|
||||
|
||||
case 'ResponseDTO':
|
||||
return ResponseDTO.fromJson(value);
|
||||
case 'SectionDTO':
|
||||
return SectionDTO.fromJson(value);
|
||||
case 'SectionType':
|
||||
return SectionTypeTypeTransformer().decode(value);
|
||||
|
||||
case 'SliderDTO':
|
||||
return SliderDTO.fromJson(value);
|
||||
case 'TokenDTO':
|
||||
return TokenDTO.fromJson(value);
|
||||
case 'TranslationDTO':
|
||||
return TranslationDTO.fromJson(value);
|
||||
case 'User':
|
||||
return User.fromJson(value);
|
||||
case 'UserDetailDTO':
|
||||
return UserDetailDTO.fromJson(value);
|
||||
case 'VideoDTO':
|
||||
return VideoDTO.fromJson(value);
|
||||
case 'WebDTO':
|
||||
return WebDTO.fromJson(value);
|
||||
default:
|
||||
Match match;
|
||||
if (value is List && (match = _regList.firstMatch(targetType)) != null) {
|
||||
final newTargetType = match[1];
|
||||
return value
|
||||
.map((v) => _deserialize(v, newTargetType, growable: growable))
|
||||
.toList(growable: true == growable);
|
||||
}
|
||||
if (value is Set && (match = _regSet.firstMatch(targetType)) != null) {
|
||||
final newTargetType = match[1];
|
||||
return value
|
||||
.map((v) => _deserialize(v, newTargetType, growable: growable))
|
||||
.toSet();
|
||||
}
|
||||
if (value is Map && (match = _regMap.firstMatch(targetType)) != null) {
|
||||
final newTargetType = match[1];
|
||||
return Map.fromIterables(
|
||||
value.keys,
|
||||
value.values.map((v) => _deserialize(v, newTargetType, growable: growable)),
|
||||
);
|
||||
}
|
||||
break;
|
||||
}
|
||||
} on Exception catch (e, stack) {
|
||||
throw ApiException.withInner(HttpStatus.internalServerError, 'Exception during deserialization.', e, stack,);
|
||||
}
|
||||
throw ApiException(HttpStatus.internalServerError, 'Could not find a suitable class for deserialization',);
|
||||
}
|
||||
|
||||
dynamic deserialize(String json, String targetType, {bool growable}) {
|
||||
// Remove all spaces. Necessary for reg expressions as well.
|
||||
targetType = targetType.replaceAll(' ', '');
|
||||
|
||||
return targetType == 'String'
|
||||
? json
|
||||
: _deserialize(jsonDecode(json), targetType, growable: true == growable);
|
||||
}
|
||||
|
||||
String serialize(Object obj) => obj == null ? '' : json.encode(obj);
|
||||
|
||||
/// Update query and header parameters based on authentication settings.
|
||||
/// @param authNames The authentications to apply
|
||||
void _updateParamsForAuth(
|
||||
List<String> authNames,
|
||||
List<QueryParam> queryParams,
|
||||
Map<String, String> headerParams,
|
||||
) {
|
||||
authNames.forEach((authName) {
|
||||
final auth = _authentications[authName];
|
||||
if (auth == null) {
|
||||
throw ArgumentError('Authentication undefined: $authName');
|
||||
}
|
||||
auth.applyToParams(queryParams, headerParams);
|
||||
});
|
||||
}
|
||||
}
|
||||
31
manager_api/lib/api_exception.dart
Normal file
31
manager_api/lib/api_exception.dart
Normal file
@ -0,0 +1,31 @@
|
||||
//
|
||||
// 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 ApiException implements Exception {
|
||||
ApiException(this.code, this.message);
|
||||
|
||||
ApiException.withInner(this.code, this.message, this.innerException, this.stackTrace);
|
||||
|
||||
int code = 0;
|
||||
String message;
|
||||
Exception innerException;
|
||||
StackTrace stackTrace;
|
||||
|
||||
String toString() {
|
||||
if (message == null) {
|
||||
return 'ApiException';
|
||||
}
|
||||
if (innerException == null) {
|
||||
return 'ApiException $code: $message';
|
||||
}
|
||||
return 'ApiException $code: $message (Inner exception: $innerException)\n\n$stackTrace';
|
||||
}
|
||||
}
|
||||
80
manager_api/lib/api_helper.dart
Normal file
80
manager_api/lib/api_helper.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 QueryParam {
|
||||
const QueryParam(this.name, this.value);
|
||||
|
||||
final String name;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => '${Uri.encodeQueryComponent(name)}=${Uri.encodeQueryComponent(value)}';
|
||||
}
|
||||
|
||||
// Ported from the Java version.
|
||||
Iterable<QueryParam> _convertParametersForCollectionFormat(
|
||||
String collectionFormat,
|
||||
String name,
|
||||
dynamic value,
|
||||
) {
|
||||
final params = <QueryParam>[];
|
||||
|
||||
// preconditions
|
||||
if (name != null && !name.isEmpty && value != null) {
|
||||
if (value is List) {
|
||||
// get the collection format, default: csv
|
||||
collectionFormat = (collectionFormat == null || collectionFormat.isEmpty)
|
||||
? 'csv'
|
||||
: collectionFormat;
|
||||
|
||||
if (collectionFormat == 'multi') {
|
||||
return value.map((v) => QueryParam(name, parameterToString(v)));
|
||||
}
|
||||
|
||||
final delimiter = _delimiters[collectionFormat] ?? ',';
|
||||
|
||||
params.add(QueryParam(name, value.map((v) => parameterToString(v)).join(delimiter)));
|
||||
} else {
|
||||
params.add(QueryParam(name, parameterToString(value)));
|
||||
}
|
||||
}
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
/// Format the given parameter object into a [String].
|
||||
String parameterToString(dynamic value) {
|
||||
if (value == null) {
|
||||
return '';
|
||||
}
|
||||
if (value is DateTime) {
|
||||
return value.toUtc().toIso8601String();
|
||||
}
|
||||
if (value is MapTypeApp) {
|
||||
return MapTypeAppTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is ResourceType) {
|
||||
return ResourceTypeTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is SectionType) {
|
||||
return SectionTypeTypeTransformer().encode(value).toString();
|
||||
}
|
||||
return value.toString();
|
||||
}
|
||||
|
||||
/// Returns the decoded body as UTF-8 if the given headers indicate an 'application/json'
|
||||
/// content type. Otherwise, returns the decoded body as decoded by dart:http package.
|
||||
String _decodeBodyBytes(Response response) {
|
||||
final contentType = response.headers['content-type'];
|
||||
return contentType != null && contentType.toLowerCase().startsWith('application/json')
|
||||
? response.bodyBytes == null ? null : utf8.decode(response.bodyBytes)
|
||||
: response.body;
|
||||
}
|
||||
35
manager_api/lib/auth/api_key_auth.dart
Normal file
35
manager_api/lib/auth/api_key_auth.dart
Normal file
@ -0,0 +1,35 @@
|
||||
//
|
||||
// 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 ApiKeyAuth implements Authentication {
|
||||
ApiKeyAuth(this.location, this.paramName);
|
||||
|
||||
final String location;
|
||||
final String paramName;
|
||||
|
||||
String apiKeyPrefix;
|
||||
String apiKey;
|
||||
|
||||
@override
|
||||
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) {
|
||||
final value = apiKeyPrefix == null ? apiKey : '$apiKeyPrefix $apiKey';
|
||||
|
||||
if (location == 'query' && value != null) {
|
||||
queryParams.add(QueryParam(paramName, value));
|
||||
} else if (location == 'header' && value != null) {
|
||||
headerParams[paramName] = value;
|
||||
} else if (location == 'cookie' && value != null) {
|
||||
headerParams.update('Cookie', (String existingCookie) {
|
||||
return '$existingCookie; $paramName=$value';
|
||||
}, ifAbsent: () => '$paramName=$value');
|
||||
}
|
||||
}
|
||||
}
|
||||
15
manager_api/lib/auth/authentication.dart
Normal file
15
manager_api/lib/auth/authentication.dart
Normal file
@ -0,0 +1,15 @@
|
||||
//
|
||||
// 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;
|
||||
|
||||
abstract class Authentication {
|
||||
/// Apply authentication settings to header and query params.
|
||||
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams);
|
||||
}
|
||||
21
manager_api/lib/auth/http_basic_auth.dart
Normal file
21
manager_api/lib/auth/http_basic_auth.dart
Normal file
@ -0,0 +1,21 @@
|
||||
//
|
||||
// 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 HttpBasicAuth implements Authentication {
|
||||
String username;
|
||||
String password;
|
||||
|
||||
@override
|
||||
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) {
|
||||
final credentials = (username ?? '') + ':' + (password ?? '');
|
||||
headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}';
|
||||
}
|
||||
}
|
||||
38
manager_api/lib/auth/http_bearer_auth.dart
Normal file
38
manager_api/lib/auth/http_bearer_auth.dart
Normal file
@ -0,0 +1,38 @@
|
||||
//
|
||||
// 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;
|
||||
|
||||
typedef HttpBearerAuthProvider = String Function();
|
||||
|
||||
class HttpBearerAuth implements Authentication {
|
||||
HttpBearerAuth();
|
||||
|
||||
dynamic _accessToken;
|
||||
|
||||
dynamic get accessToken => _accessToken;
|
||||
|
||||
set accessToken(dynamic accessToken) {
|
||||
if (accessToken is! String && accessToken is! HttpBearerAuthProvider) {
|
||||
throw ArgumentError('Type of Bearer accessToken should be a String or a String Function().');
|
||||
}
|
||||
this._accessToken = accessToken;
|
||||
}
|
||||
|
||||
@override
|
||||
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) {
|
||||
if (_accessToken is String) {
|
||||
headerParams['Authorization'] = 'Bearer $_accessToken';
|
||||
} else if (_accessToken is HttpBearerAuthProvider) {
|
||||
headerParams['Authorization'] = 'Bearer ${_accessToken()}';
|
||||
} else {
|
||||
throw ArgumentError('Type of Bearer accessToken should be a String or a String Function().');
|
||||
}
|
||||
}
|
||||
}
|
||||
23
manager_api/lib/auth/oauth.dart
Normal file
23
manager_api/lib/auth/oauth.dart
Normal file
@ -0,0 +1,23 @@
|
||||
//
|
||||
// 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 OAuth implements Authentication {
|
||||
OAuth({this.accessToken});
|
||||
|
||||
String accessToken;
|
||||
|
||||
@override
|
||||
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) {
|
||||
if (accessToken != null) {
|
||||
headerParams['Authorization'] = 'Bearer $accessToken';
|
||||
}
|
||||
}
|
||||
}
|
||||
116
manager_api/lib/model/article_dto.dart
Normal file
116
manager_api/lib/model/article_dto.dart
Normal file
@ -0,0 +1,116 @@
|
||||
//
|
||||
// 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 ArticleDTO {
|
||||
/// Returns a new [ArticleDTO] instance.
|
||||
ArticleDTO({
|
||||
this.content,
|
||||
this.qrCode,
|
||||
this.isContentTop,
|
||||
this.audioId,
|
||||
this.isReadAudioAuto,
|
||||
this.images,
|
||||
});
|
||||
|
||||
List<TranslationDTO> content;
|
||||
|
||||
String qrCode;
|
||||
|
||||
bool isContentTop;
|
||||
|
||||
String audioId;
|
||||
|
||||
bool isReadAudioAuto;
|
||||
|
||||
List<ImageDTO> images;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ArticleDTO &&
|
||||
other.content == content &&
|
||||
other.qrCode == qrCode &&
|
||||
other.isContentTop == isContentTop &&
|
||||
other.audioId == audioId &&
|
||||
other.isReadAudioAuto == isReadAudioAuto &&
|
||||
other.images == images;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
(content == null ? 0 : content.hashCode) +
|
||||
(qrCode == null ? 0 : qrCode.hashCode) +
|
||||
(isContentTop == null ? 0 : isContentTop.hashCode) +
|
||||
(audioId == null ? 0 : audioId.hashCode) +
|
||||
(isReadAudioAuto == null ? 0 : isReadAudioAuto.hashCode) +
|
||||
(images == null ? 0 : images.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ArticleDTO[content=$content, qrCode=$qrCode, isContentTop=$isContentTop, audioId=$audioId, isReadAudioAuto=$isReadAudioAuto, images=$images]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (content != null) {
|
||||
json[r'content'] = content;
|
||||
}
|
||||
if (qrCode != null) {
|
||||
json[r'qrCode'] = qrCode;
|
||||
}
|
||||
if (isContentTop != null) {
|
||||
json[r'isContentTop'] = isContentTop;
|
||||
}
|
||||
if (audioId != null) {
|
||||
json[r'audioId'] = audioId;
|
||||
}
|
||||
if (isReadAudioAuto != null) {
|
||||
json[r'isReadAudioAuto'] = isReadAudioAuto;
|
||||
}
|
||||
if (images != null) {
|
||||
json[r'images'] = images;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ArticleDTO] instance and imports its values from
|
||||
/// [json] if it's non-null, null if [json] is null.
|
||||
static ArticleDTO fromJson(Map<String, dynamic> json) => json == null
|
||||
? null
|
||||
: ArticleDTO(
|
||||
content: TranslationDTO.listFromJson(json[r'content']),
|
||||
qrCode: json[r'qrCode'],
|
||||
isContentTop: json[r'isContentTop'],
|
||||
audioId: json[r'audioId'],
|
||||
isReadAudioAuto: json[r'isReadAudioAuto'],
|
||||
images: ImageDTO.listFromJson(json[r'images']),
|
||||
);
|
||||
|
||||
static List<ArticleDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ArticleDTO>[]
|
||||
: json.map((v) => ArticleDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ArticleDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ArticleDTO>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = ArticleDTO.fromJson(v));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ArticleDTO-objects as value to a dart map
|
||||
static Map<String, List<ArticleDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ArticleDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = ArticleDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
147
manager_api/lib/model/configuration_dto.dart
Normal file
147
manager_api/lib/model/configuration_dto.dart
Normal file
@ -0,0 +1,147 @@
|
||||
//
|
||||
// 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 ConfigurationDTO {
|
||||
/// Returns a new [ConfigurationDTO] instance.
|
||||
ConfigurationDTO({
|
||||
this.id,
|
||||
this.label,
|
||||
this.primaryColor,
|
||||
this.secondaryColor,
|
||||
this.languages,
|
||||
this.dateCreation,
|
||||
this.isMobile,
|
||||
this.isTablet,
|
||||
this.isOffline,
|
||||
});
|
||||
|
||||
String id;
|
||||
|
||||
String label;
|
||||
|
||||
String primaryColor;
|
||||
|
||||
String secondaryColor;
|
||||
|
||||
List<String> languages;
|
||||
|
||||
DateTime dateCreation;
|
||||
|
||||
bool isMobile;
|
||||
|
||||
bool isTablet;
|
||||
|
||||
bool isOffline;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ConfigurationDTO &&
|
||||
other.id == id &&
|
||||
other.label == label &&
|
||||
other.primaryColor == primaryColor &&
|
||||
other.secondaryColor == secondaryColor &&
|
||||
other.languages == languages &&
|
||||
other.dateCreation == dateCreation &&
|
||||
other.isMobile == isMobile &&
|
||||
other.isTablet == isTablet &&
|
||||
other.isOffline == isOffline;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
(id == null ? 0 : id.hashCode) +
|
||||
(label == null ? 0 : label.hashCode) +
|
||||
(primaryColor == null ? 0 : primaryColor.hashCode) +
|
||||
(secondaryColor == null ? 0 : secondaryColor.hashCode) +
|
||||
(languages == null ? 0 : languages.hashCode) +
|
||||
(dateCreation == null ? 0 : dateCreation.hashCode) +
|
||||
(isMobile == null ? 0 : isMobile.hashCode) +
|
||||
(isTablet == null ? 0 : isTablet.hashCode) +
|
||||
(isOffline == null ? 0 : isOffline.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ConfigurationDTO[id=$id, label=$label, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, isMobile=$isMobile, isTablet=$isTablet, isOffline=$isOffline]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (id != null) {
|
||||
json[r'id'] = id;
|
||||
}
|
||||
if (label != null) {
|
||||
json[r'label'] = label;
|
||||
}
|
||||
if (primaryColor != null) {
|
||||
json[r'primaryColor'] = primaryColor;
|
||||
}
|
||||
if (secondaryColor != null) {
|
||||
json[r'secondaryColor'] = secondaryColor;
|
||||
}
|
||||
if (languages != null) {
|
||||
json[r'languages'] = languages;
|
||||
}
|
||||
if (dateCreation != null) {
|
||||
json[r'dateCreation'] = dateCreation.toUtc().toIso8601String();
|
||||
}
|
||||
if (isMobile != null) {
|
||||
json[r'isMobile'] = isMobile;
|
||||
}
|
||||
if (isTablet != null) {
|
||||
json[r'isTablet'] = isTablet;
|
||||
}
|
||||
if (isOffline != null) {
|
||||
json[r'isOffline'] = isOffline;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ConfigurationDTO] instance and imports its values from
|
||||
/// [json] if it's non-null, null if [json] is null.
|
||||
static ConfigurationDTO fromJson(Map<String, dynamic> json) => json == null
|
||||
? null
|
||||
: ConfigurationDTO(
|
||||
id: json[r'id'],
|
||||
label: json[r'label'],
|
||||
primaryColor: json[r'primaryColor'],
|
||||
secondaryColor: json[r'secondaryColor'],
|
||||
languages: json[r'languages'] == null
|
||||
? null
|
||||
: (json[r'languages'] as List).cast<String>(),
|
||||
dateCreation: json[r'dateCreation'] == null
|
||||
? null
|
||||
: DateTime.parse(json[r'dateCreation']),
|
||||
isMobile: json[r'isMobile'],
|
||||
isTablet: json[r'isTablet'],
|
||||
isOffline: json[r'isOffline'],
|
||||
);
|
||||
|
||||
static List<ConfigurationDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ConfigurationDTO>[]
|
||||
: json.map((v) => ConfigurationDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ConfigurationDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ConfigurationDTO>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = ConfigurationDTO.fromJson(v));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ConfigurationDTO-objects as value to a dart map
|
||||
static Map<String, List<ConfigurationDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ConfigurationDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = ConfigurationDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
196
manager_api/lib/model/device_detail_dto.dart
Normal file
196
manager_api/lib/model/device_detail_dto.dart
Normal file
@ -0,0 +1,196 @@
|
||||
//
|
||||
// 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 DeviceDetailDTO {
|
||||
/// Returns a new [DeviceDetailDTO] instance.
|
||||
DeviceDetailDTO({
|
||||
this.id,
|
||||
this.identifier,
|
||||
this.name,
|
||||
this.ipAddressWLAN,
|
||||
this.ipAddressETH,
|
||||
this.configurationId,
|
||||
this.configuration,
|
||||
this.connected,
|
||||
this.dateCreation,
|
||||
this.dateUpdate,
|
||||
this.connectionLevel,
|
||||
this.lastConnectionLevel,
|
||||
this.batteryLevel,
|
||||
this.lastBatteryLevel,
|
||||
});
|
||||
|
||||
String id;
|
||||
|
||||
String identifier;
|
||||
|
||||
String name;
|
||||
|
||||
String ipAddressWLAN;
|
||||
|
||||
String ipAddressETH;
|
||||
|
||||
String configurationId;
|
||||
|
||||
String configuration;
|
||||
|
||||
bool connected;
|
||||
|
||||
DateTime dateCreation;
|
||||
|
||||
DateTime dateUpdate;
|
||||
|
||||
String connectionLevel;
|
||||
|
||||
DateTime lastConnectionLevel;
|
||||
|
||||
String batteryLevel;
|
||||
|
||||
DateTime lastBatteryLevel;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is DeviceDetailDTO &&
|
||||
other.id == id &&
|
||||
other.identifier == identifier &&
|
||||
other.name == name &&
|
||||
other.ipAddressWLAN == ipAddressWLAN &&
|
||||
other.ipAddressETH == ipAddressETH &&
|
||||
other.configurationId == configurationId &&
|
||||
other.configuration == configuration &&
|
||||
other.connected == connected &&
|
||||
other.dateCreation == dateCreation &&
|
||||
other.dateUpdate == dateUpdate &&
|
||||
other.connectionLevel == connectionLevel &&
|
||||
other.lastConnectionLevel == lastConnectionLevel &&
|
||||
other.batteryLevel == batteryLevel &&
|
||||
other.lastBatteryLevel == lastBatteryLevel;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
(id == null ? 0 : id.hashCode) +
|
||||
(identifier == null ? 0 : identifier.hashCode) +
|
||||
(name == null ? 0 : name.hashCode) +
|
||||
(ipAddressWLAN == null ? 0 : ipAddressWLAN.hashCode) +
|
||||
(ipAddressETH == null ? 0 : ipAddressETH.hashCode) +
|
||||
(configurationId == null ? 0 : configurationId.hashCode) +
|
||||
(configuration == null ? 0 : configuration.hashCode) +
|
||||
(connected == null ? 0 : connected.hashCode) +
|
||||
(dateCreation == null ? 0 : dateCreation.hashCode) +
|
||||
(dateUpdate == null ? 0 : dateUpdate.hashCode) +
|
||||
(connectionLevel == null ? 0 : connectionLevel.hashCode) +
|
||||
(lastConnectionLevel == null ? 0 : lastConnectionLevel.hashCode) +
|
||||
(batteryLevel == null ? 0 : batteryLevel.hashCode) +
|
||||
(lastBatteryLevel == null ? 0 : lastBatteryLevel.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'DeviceDetailDTO[id=$id, identifier=$identifier, name=$name, ipAddressWLAN=$ipAddressWLAN, ipAddressETH=$ipAddressETH, configurationId=$configurationId, configuration=$configuration, connected=$connected, dateCreation=$dateCreation, dateUpdate=$dateUpdate, connectionLevel=$connectionLevel, lastConnectionLevel=$lastConnectionLevel, batteryLevel=$batteryLevel, lastBatteryLevel=$lastBatteryLevel]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (id != null) {
|
||||
json[r'id'] = id;
|
||||
}
|
||||
if (identifier != null) {
|
||||
json[r'identifier'] = identifier;
|
||||
}
|
||||
if (name != null) {
|
||||
json[r'name'] = name;
|
||||
}
|
||||
if (ipAddressWLAN != null) {
|
||||
json[r'ipAddressWLAN'] = ipAddressWLAN;
|
||||
}
|
||||
if (ipAddressETH != null) {
|
||||
json[r'ipAddressETH'] = ipAddressETH;
|
||||
}
|
||||
if (configurationId != null) {
|
||||
json[r'configurationId'] = configurationId;
|
||||
}
|
||||
if (configuration != null) {
|
||||
json[r'configuration'] = configuration;
|
||||
}
|
||||
if (connected != null) {
|
||||
json[r'connected'] = connected;
|
||||
}
|
||||
if (dateCreation != null) {
|
||||
json[r'dateCreation'] = dateCreation.toUtc().toIso8601String();
|
||||
}
|
||||
if (dateUpdate != null) {
|
||||
json[r'dateUpdate'] = dateUpdate.toUtc().toIso8601String();
|
||||
}
|
||||
if (connectionLevel != null) {
|
||||
json[r'connectionLevel'] = connectionLevel;
|
||||
}
|
||||
if (lastConnectionLevel != null) {
|
||||
json[r'lastConnectionLevel'] = lastConnectionLevel.toUtc().toIso8601String();
|
||||
}
|
||||
if (batteryLevel != null) {
|
||||
json[r'batteryLevel'] = batteryLevel;
|
||||
}
|
||||
if (lastBatteryLevel != null) {
|
||||
json[r'lastBatteryLevel'] = lastBatteryLevel.toUtc().toIso8601String();
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [DeviceDetailDTO] instance and imports its values from
|
||||
/// [json] if it's non-null, null if [json] is null.
|
||||
static DeviceDetailDTO fromJson(Map<String, dynamic> json) => json == null
|
||||
? null
|
||||
: DeviceDetailDTO(
|
||||
id: json[r'id'],
|
||||
identifier: json[r'identifier'],
|
||||
name: json[r'name'],
|
||||
ipAddressWLAN: json[r'ipAddressWLAN'],
|
||||
ipAddressETH: json[r'ipAddressETH'],
|
||||
configurationId: json[r'configurationId'],
|
||||
configuration: json[r'configuration'],
|
||||
connected: json[r'connected'],
|
||||
dateCreation: json[r'dateCreation'] == null
|
||||
? null
|
||||
: DateTime.parse(json[r'dateCreation']),
|
||||
dateUpdate: json[r'dateUpdate'] == null
|
||||
? null
|
||||
: DateTime.parse(json[r'dateUpdate']),
|
||||
connectionLevel: json[r'connectionLevel'],
|
||||
lastConnectionLevel: json[r'lastConnectionLevel'] == null
|
||||
? null
|
||||
: DateTime.parse(json[r'lastConnectionLevel']),
|
||||
batteryLevel: json[r'batteryLevel'],
|
||||
lastBatteryLevel: json[r'lastBatteryLevel'] == null
|
||||
? null
|
||||
: DateTime.parse(json[r'lastBatteryLevel']),
|
||||
);
|
||||
|
||||
static List<DeviceDetailDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <DeviceDetailDTO>[]
|
||||
: json.map((v) => DeviceDetailDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, DeviceDetailDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, DeviceDetailDTO>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = DeviceDetailDTO.fromJson(v));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of DeviceDetailDTO-objects as value to a dart map
|
||||
static Map<String, List<DeviceDetailDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<DeviceDetailDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = DeviceDetailDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
102
manager_api/lib/model/device_detail_dto_all_of.dart
Normal file
102
manager_api/lib/model/device_detail_dto_all_of.dart
Normal file
@ -0,0 +1,102 @@
|
||||
//
|
||||
// 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 DeviceDetailDTOAllOf {
|
||||
/// Returns a new [DeviceDetailDTOAllOf] instance.
|
||||
DeviceDetailDTOAllOf({
|
||||
this.connectionLevel,
|
||||
this.lastConnectionLevel,
|
||||
this.batteryLevel,
|
||||
this.lastBatteryLevel,
|
||||
});
|
||||
|
||||
String connectionLevel;
|
||||
|
||||
DateTime lastConnectionLevel;
|
||||
|
||||
String batteryLevel;
|
||||
|
||||
DateTime lastBatteryLevel;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is DeviceDetailDTOAllOf &&
|
||||
other.connectionLevel == connectionLevel &&
|
||||
other.lastConnectionLevel == lastConnectionLevel &&
|
||||
other.batteryLevel == batteryLevel &&
|
||||
other.lastBatteryLevel == lastBatteryLevel;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
(connectionLevel == null ? 0 : connectionLevel.hashCode) +
|
||||
(lastConnectionLevel == null ? 0 : lastConnectionLevel.hashCode) +
|
||||
(batteryLevel == null ? 0 : batteryLevel.hashCode) +
|
||||
(lastBatteryLevel == null ? 0 : lastBatteryLevel.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'DeviceDetailDTOAllOf[connectionLevel=$connectionLevel, lastConnectionLevel=$lastConnectionLevel, batteryLevel=$batteryLevel, lastBatteryLevel=$lastBatteryLevel]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (connectionLevel != null) {
|
||||
json[r'connectionLevel'] = connectionLevel;
|
||||
}
|
||||
if (lastConnectionLevel != null) {
|
||||
json[r'lastConnectionLevel'] = lastConnectionLevel.toUtc().toIso8601String();
|
||||
}
|
||||
if (batteryLevel != null) {
|
||||
json[r'batteryLevel'] = batteryLevel;
|
||||
}
|
||||
if (lastBatteryLevel != null) {
|
||||
json[r'lastBatteryLevel'] = lastBatteryLevel.toUtc().toIso8601String();
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [DeviceDetailDTOAllOf] instance and imports its values from
|
||||
/// [json] if it's non-null, null if [json] is null.
|
||||
static DeviceDetailDTOAllOf fromJson(Map<String, dynamic> json) => json == null
|
||||
? null
|
||||
: DeviceDetailDTOAllOf(
|
||||
connectionLevel: json[r'connectionLevel'],
|
||||
lastConnectionLevel: json[r'lastConnectionLevel'] == null
|
||||
? null
|
||||
: DateTime.parse(json[r'lastConnectionLevel']),
|
||||
batteryLevel: json[r'batteryLevel'],
|
||||
lastBatteryLevel: json[r'lastBatteryLevel'] == null
|
||||
? null
|
||||
: DateTime.parse(json[r'lastBatteryLevel']),
|
||||
);
|
||||
|
||||
static List<DeviceDetailDTOAllOf> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <DeviceDetailDTOAllOf>[]
|
||||
: json.map((v) => DeviceDetailDTOAllOf.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, DeviceDetailDTOAllOf> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, DeviceDetailDTOAllOf>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = DeviceDetailDTOAllOf.fromJson(v));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of DeviceDetailDTOAllOf-objects as value to a dart map
|
||||
static Map<String, List<DeviceDetailDTOAllOf>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<DeviceDetailDTOAllOf>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = DeviceDetailDTOAllOf.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
156
manager_api/lib/model/device_dto.dart
Normal file
156
manager_api/lib/model/device_dto.dart
Normal file
@ -0,0 +1,156 @@
|
||||
//
|
||||
// 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 DeviceDTO {
|
||||
/// Returns a new [DeviceDTO] instance.
|
||||
DeviceDTO({
|
||||
this.id,
|
||||
this.identifier,
|
||||
this.name,
|
||||
this.ipAddressWLAN,
|
||||
this.ipAddressETH,
|
||||
this.configurationId,
|
||||
this.configuration,
|
||||
this.connected,
|
||||
this.dateCreation,
|
||||
this.dateUpdate,
|
||||
});
|
||||
|
||||
String id;
|
||||
|
||||
String identifier;
|
||||
|
||||
String name;
|
||||
|
||||
String ipAddressWLAN;
|
||||
|
||||
String ipAddressETH;
|
||||
|
||||
String configurationId;
|
||||
|
||||
String configuration;
|
||||
|
||||
bool connected;
|
||||
|
||||
DateTime dateCreation;
|
||||
|
||||
DateTime dateUpdate;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is DeviceDTO &&
|
||||
other.id == id &&
|
||||
other.identifier == identifier &&
|
||||
other.name == name &&
|
||||
other.ipAddressWLAN == ipAddressWLAN &&
|
||||
other.ipAddressETH == ipAddressETH &&
|
||||
other.configurationId == configurationId &&
|
||||
other.configuration == configuration &&
|
||||
other.connected == connected &&
|
||||
other.dateCreation == dateCreation &&
|
||||
other.dateUpdate == dateUpdate;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
(id == null ? 0 : id.hashCode) +
|
||||
(identifier == null ? 0 : identifier.hashCode) +
|
||||
(name == null ? 0 : name.hashCode) +
|
||||
(ipAddressWLAN == null ? 0 : ipAddressWLAN.hashCode) +
|
||||
(ipAddressETH == null ? 0 : ipAddressETH.hashCode) +
|
||||
(configurationId == null ? 0 : configurationId.hashCode) +
|
||||
(configuration == null ? 0 : configuration.hashCode) +
|
||||
(connected == null ? 0 : connected.hashCode) +
|
||||
(dateCreation == null ? 0 : dateCreation.hashCode) +
|
||||
(dateUpdate == null ? 0 : dateUpdate.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'DeviceDTO[id=$id, identifier=$identifier, name=$name, ipAddressWLAN=$ipAddressWLAN, ipAddressETH=$ipAddressETH, configurationId=$configurationId, configuration=$configuration, connected=$connected, dateCreation=$dateCreation, dateUpdate=$dateUpdate]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (id != null) {
|
||||
json[r'id'] = id;
|
||||
}
|
||||
if (identifier != null) {
|
||||
json[r'identifier'] = identifier;
|
||||
}
|
||||
if (name != null) {
|
||||
json[r'name'] = name;
|
||||
}
|
||||
if (ipAddressWLAN != null) {
|
||||
json[r'ipAddressWLAN'] = ipAddressWLAN;
|
||||
}
|
||||
if (ipAddressETH != null) {
|
||||
json[r'ipAddressETH'] = ipAddressETH;
|
||||
}
|
||||
if (configurationId != null) {
|
||||
json[r'configurationId'] = configurationId;
|
||||
}
|
||||
if (configuration != null) {
|
||||
json[r'configuration'] = configuration;
|
||||
}
|
||||
if (connected != null) {
|
||||
json[r'connected'] = connected;
|
||||
}
|
||||
if (dateCreation != null) {
|
||||
json[r'dateCreation'] = dateCreation.toUtc().toIso8601String();
|
||||
}
|
||||
if (dateUpdate != null) {
|
||||
json[r'dateUpdate'] = dateUpdate.toUtc().toIso8601String();
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [DeviceDTO] instance and imports its values from
|
||||
/// [json] if it's non-null, null if [json] is null.
|
||||
static DeviceDTO fromJson(Map<String, dynamic> json) => json == null
|
||||
? null
|
||||
: DeviceDTO(
|
||||
id: json[r'id'],
|
||||
identifier: json[r'identifier'],
|
||||
name: json[r'name'],
|
||||
ipAddressWLAN: json[r'ipAddressWLAN'],
|
||||
ipAddressETH: json[r'ipAddressETH'],
|
||||
configurationId: json[r'configurationId'],
|
||||
configuration: json[r'configuration'],
|
||||
connected: json[r'connected'],
|
||||
dateCreation: json[r'dateCreation'] == null
|
||||
? null
|
||||
: DateTime.parse(json[r'dateCreation']),
|
||||
dateUpdate: json[r'dateUpdate'] == null
|
||||
? null
|
||||
: DateTime.parse(json[r'dateUpdate']),
|
||||
);
|
||||
|
||||
static List<DeviceDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <DeviceDTO>[]
|
||||
: json.map((v) => DeviceDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, DeviceDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, DeviceDTO>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = DeviceDTO.fromJson(v));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of DeviceDTO-objects as value to a dart map
|
||||
static Map<String, List<DeviceDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<DeviceDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = DeviceDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
131
manager_api/lib/model/display_dto.dart
Normal file
131
manager_api/lib/model/display_dto.dart
Normal file
@ -0,0 +1,131 @@
|
||||
//
|
||||
// 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 DisplayDTO {
|
||||
/// Returns a new [DisplayDTO] instance.
|
||||
DisplayDTO({
|
||||
this.id,
|
||||
this.label,
|
||||
this.sectionIds,
|
||||
this.primaryColor,
|
||||
this.secondaryColor,
|
||||
this.languages,
|
||||
this.dateCreation,
|
||||
});
|
||||
|
||||
String id;
|
||||
|
||||
String label;
|
||||
|
||||
List<String> sectionIds;
|
||||
|
||||
String primaryColor;
|
||||
|
||||
String secondaryColor;
|
||||
|
||||
List<String> languages;
|
||||
|
||||
DateTime dateCreation;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is DisplayDTO &&
|
||||
other.id == id &&
|
||||
other.label == label &&
|
||||
other.sectionIds == sectionIds &&
|
||||
other.primaryColor == primaryColor &&
|
||||
other.secondaryColor == secondaryColor &&
|
||||
other.languages == languages &&
|
||||
other.dateCreation == dateCreation;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
(id == null ? 0 : id.hashCode) +
|
||||
(label == null ? 0 : label.hashCode) +
|
||||
(sectionIds == null ? 0 : sectionIds.hashCode) +
|
||||
(primaryColor == null ? 0 : primaryColor.hashCode) +
|
||||
(secondaryColor == null ? 0 : secondaryColor.hashCode) +
|
||||
(languages == null ? 0 : languages.hashCode) +
|
||||
(dateCreation == null ? 0 : dateCreation.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'DisplayDTO[id=$id, label=$label, sectionIds=$sectionIds, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (id != null) {
|
||||
json[r'id'] = id;
|
||||
}
|
||||
if (label != null) {
|
||||
json[r'label'] = label;
|
||||
}
|
||||
if (sectionIds != null) {
|
||||
json[r'sectionIds'] = sectionIds;
|
||||
}
|
||||
if (primaryColor != null) {
|
||||
json[r'primaryColor'] = primaryColor;
|
||||
}
|
||||
if (secondaryColor != null) {
|
||||
json[r'secondaryColor'] = secondaryColor;
|
||||
}
|
||||
if (languages != null) {
|
||||
json[r'languages'] = languages;
|
||||
}
|
||||
if (dateCreation != null) {
|
||||
json[r'dateCreation'] = dateCreation.toUtc().toIso8601String();
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [DisplayDTO] instance and imports its values from
|
||||
/// [json] if it's non-null, null if [json] is null.
|
||||
static DisplayDTO fromJson(Map<String, dynamic> json) => json == null
|
||||
? null
|
||||
: DisplayDTO(
|
||||
id: json[r'id'],
|
||||
label: json[r'label'],
|
||||
sectionIds: json[r'sectionIds'] == null
|
||||
? null
|
||||
: (json[r'sectionIds'] as List).cast<String>(),
|
||||
primaryColor: json[r'primaryColor'],
|
||||
secondaryColor: json[r'secondaryColor'],
|
||||
languages: json[r'languages'] == null
|
||||
? null
|
||||
: (json[r'languages'] as List).cast<String>(),
|
||||
dateCreation: json[r'dateCreation'] == null
|
||||
? null
|
||||
: DateTime.parse(json[r'dateCreation']),
|
||||
);
|
||||
|
||||
static List<DisplayDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <DisplayDTO>[]
|
||||
: json.map((v) => DisplayDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, DisplayDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, DisplayDTO>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = DisplayDTO.fromJson(v));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of DisplayDTO-objects as value to a dart map
|
||||
static Map<String, List<DisplayDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<DisplayDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = DisplayDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
165
manager_api/lib/model/export_configuration_dto.dart
Normal file
165
manager_api/lib/model/export_configuration_dto.dart
Normal file
@ -0,0 +1,165 @@
|
||||
//
|
||||
// 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 ExportConfigurationDTO {
|
||||
/// Returns a new [ExportConfigurationDTO] instance.
|
||||
ExportConfigurationDTO({
|
||||
this.id,
|
||||
this.label,
|
||||
this.primaryColor,
|
||||
this.secondaryColor,
|
||||
this.languages,
|
||||
this.dateCreation,
|
||||
this.isMobile,
|
||||
this.isTablet,
|
||||
this.isOffline,
|
||||
this.sections,
|
||||
this.resources,
|
||||
});
|
||||
|
||||
String id;
|
||||
|
||||
String label;
|
||||
|
||||
String primaryColor;
|
||||
|
||||
String secondaryColor;
|
||||
|
||||
List<String> languages;
|
||||
|
||||
DateTime dateCreation;
|
||||
|
||||
bool isMobile;
|
||||
|
||||
bool isTablet;
|
||||
|
||||
bool isOffline;
|
||||
|
||||
List<SectionDTO> sections;
|
||||
|
||||
List<ResourceDTO> resources;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ExportConfigurationDTO &&
|
||||
other.id == id &&
|
||||
other.label == label &&
|
||||
other.primaryColor == primaryColor &&
|
||||
other.secondaryColor == secondaryColor &&
|
||||
other.languages == languages &&
|
||||
other.dateCreation == dateCreation &&
|
||||
other.isMobile == isMobile &&
|
||||
other.isTablet == isTablet &&
|
||||
other.isOffline == isOffline &&
|
||||
other.sections == sections &&
|
||||
other.resources == resources;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
(id == null ? 0 : id.hashCode) +
|
||||
(label == null ? 0 : label.hashCode) +
|
||||
(primaryColor == null ? 0 : primaryColor.hashCode) +
|
||||
(secondaryColor == null ? 0 : secondaryColor.hashCode) +
|
||||
(languages == null ? 0 : languages.hashCode) +
|
||||
(dateCreation == null ? 0 : dateCreation.hashCode) +
|
||||
(isMobile == null ? 0 : isMobile.hashCode) +
|
||||
(isTablet == null ? 0 : isTablet.hashCode) +
|
||||
(isOffline == null ? 0 : isOffline.hashCode) +
|
||||
(sections == null ? 0 : sections.hashCode) +
|
||||
(resources == null ? 0 : resources.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ExportConfigurationDTO[id=$id, label=$label, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, isMobile=$isMobile, isTablet=$isTablet, isOffline=$isOffline, sections=$sections, resources=$resources]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (id != null) {
|
||||
json[r'id'] = id;
|
||||
}
|
||||
if (label != null) {
|
||||
json[r'label'] = label;
|
||||
}
|
||||
if (primaryColor != null) {
|
||||
json[r'primaryColor'] = primaryColor;
|
||||
}
|
||||
if (secondaryColor != null) {
|
||||
json[r'secondaryColor'] = secondaryColor;
|
||||
}
|
||||
if (languages != null) {
|
||||
json[r'languages'] = languages;
|
||||
}
|
||||
if (dateCreation != null) {
|
||||
json[r'dateCreation'] = dateCreation.toUtc().toIso8601String();
|
||||
}
|
||||
if (isMobile != null) {
|
||||
json[r'isMobile'] = isMobile;
|
||||
}
|
||||
if (isTablet != null) {
|
||||
json[r'isTablet'] = isTablet;
|
||||
}
|
||||
if (isOffline != null) {
|
||||
json[r'isOffline'] = isOffline;
|
||||
}
|
||||
if (sections != null) {
|
||||
json[r'sections'] = sections;
|
||||
}
|
||||
if (resources != null) {
|
||||
json[r'resources'] = resources;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ExportConfigurationDTO] instance and imports its values from
|
||||
/// [json] if it's non-null, null if [json] is null.
|
||||
static ExportConfigurationDTO fromJson(Map<String, dynamic> json) => json == null
|
||||
? null
|
||||
: ExportConfigurationDTO(
|
||||
id: json[r'id'],
|
||||
label: json[r'label'],
|
||||
primaryColor: json[r'primaryColor'],
|
||||
secondaryColor: json[r'secondaryColor'],
|
||||
languages: json[r'languages'] == null
|
||||
? null
|
||||
: (json[r'languages'] as List).cast<String>(),
|
||||
dateCreation: json[r'dateCreation'] == null
|
||||
? null
|
||||
: DateTime.parse(json[r'dateCreation']),
|
||||
isMobile: json[r'isMobile'],
|
||||
isTablet: json[r'isTablet'],
|
||||
isOffline: json[r'isOffline'],
|
||||
sections: SectionDTO.listFromJson(json[r'sections']),
|
||||
resources: ResourceDTO.listFromJson(json[r'resources']),
|
||||
);
|
||||
|
||||
static List<ExportConfigurationDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ExportConfigurationDTO>[]
|
||||
: json.map((v) => ExportConfigurationDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ExportConfigurationDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ExportConfigurationDTO>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = ExportConfigurationDTO.fromJson(v));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ExportConfigurationDTO-objects as value to a dart map
|
||||
static Map<String, List<ExportConfigurationDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ExportConfigurationDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = ExportConfigurationDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
80
manager_api/lib/model/export_configuration_dto_all_of.dart
Normal file
80
manager_api/lib/model/export_configuration_dto_all_of.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 ExportConfigurationDTOAllOf {
|
||||
/// Returns a new [ExportConfigurationDTOAllOf] instance.
|
||||
ExportConfigurationDTOAllOf({
|
||||
this.sections,
|
||||
this.resources,
|
||||
});
|
||||
|
||||
List<SectionDTO> sections;
|
||||
|
||||
List<ResourceDTO> resources;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ExportConfigurationDTOAllOf &&
|
||||
other.sections == sections &&
|
||||
other.resources == resources;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
(sections == null ? 0 : sections.hashCode) +
|
||||
(resources == null ? 0 : resources.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ExportConfigurationDTOAllOf[sections=$sections, resources=$resources]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (sections != null) {
|
||||
json[r'sections'] = sections;
|
||||
}
|
||||
if (resources != null) {
|
||||
json[r'resources'] = resources;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ExportConfigurationDTOAllOf] instance and imports its values from
|
||||
/// [json] if it's non-null, null if [json] is null.
|
||||
static ExportConfigurationDTOAllOf fromJson(Map<String, dynamic> json) => json == null
|
||||
? null
|
||||
: ExportConfigurationDTOAllOf(
|
||||
sections: SectionDTO.listFromJson(json[r'sections']),
|
||||
resources: ResourceDTO.listFromJson(json[r'resources']),
|
||||
);
|
||||
|
||||
static List<ExportConfigurationDTOAllOf> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ExportConfigurationDTOAllOf>[]
|
||||
: json.map((v) => ExportConfigurationDTOAllOf.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ExportConfigurationDTOAllOf> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ExportConfigurationDTOAllOf>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = ExportConfigurationDTOAllOf.fromJson(v));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ExportConfigurationDTOAllOf-objects as value to a dart map
|
||||
static Map<String, List<ExportConfigurationDTOAllOf>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ExportConfigurationDTOAllOf>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = ExportConfigurationDTOAllOf.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
116
manager_api/lib/model/geo_point_dto.dart
Normal file
116
manager_api/lib/model/geo_point_dto.dart
Normal file
@ -0,0 +1,116 @@
|
||||
//
|
||||
// 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 GeoPointDTO {
|
||||
/// Returns a new [GeoPointDTO] instance.
|
||||
GeoPointDTO({
|
||||
this.id,
|
||||
this.title,
|
||||
this.description,
|
||||
this.images,
|
||||
this.latitude,
|
||||
this.longitude,
|
||||
});
|
||||
|
||||
int id;
|
||||
|
||||
List<TranslationDTO> title;
|
||||
|
||||
List<TranslationDTO> description;
|
||||
|
||||
List<ImageGeoPoint> images;
|
||||
|
||||
String latitude;
|
||||
|
||||
String longitude;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is GeoPointDTO &&
|
||||
other.id == id &&
|
||||
other.title == title &&
|
||||
other.description == description &&
|
||||
other.images == images &&
|
||||
other.latitude == latitude &&
|
||||
other.longitude == longitude;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
(id == null ? 0 : id.hashCode) +
|
||||
(title == null ? 0 : title.hashCode) +
|
||||
(description == null ? 0 : description.hashCode) +
|
||||
(images == null ? 0 : images.hashCode) +
|
||||
(latitude == null ? 0 : latitude.hashCode) +
|
||||
(longitude == null ? 0 : longitude.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'GeoPointDTO[id=$id, title=$title, description=$description, images=$images, latitude=$latitude, longitude=$longitude]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (id != null) {
|
||||
json[r'id'] = id;
|
||||
}
|
||||
if (title != null) {
|
||||
json[r'title'] = title;
|
||||
}
|
||||
if (description != null) {
|
||||
json[r'description'] = description;
|
||||
}
|
||||
if (images != null) {
|
||||
json[r'images'] = images;
|
||||
}
|
||||
if (latitude != null) {
|
||||
json[r'latitude'] = latitude;
|
||||
}
|
||||
if (longitude != null) {
|
||||
json[r'longitude'] = longitude;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [GeoPointDTO] instance and imports its values from
|
||||
/// [json] if it's non-null, null if [json] is null.
|
||||
static GeoPointDTO fromJson(Map<String, dynamic> json) => json == null
|
||||
? null
|
||||
: GeoPointDTO(
|
||||
id: json[r'id'],
|
||||
title: TranslationDTO.listFromJson(json[r'title']),
|
||||
description: TranslationDTO.listFromJson(json[r'description']),
|
||||
images: ImageGeoPoint.listFromJson(json[r'images']),
|
||||
latitude: json[r'latitude'],
|
||||
longitude: json[r'longitude'],
|
||||
);
|
||||
|
||||
static List<GeoPointDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <GeoPointDTO>[]
|
||||
: json.map((v) => GeoPointDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, GeoPointDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, GeoPointDTO>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = GeoPointDTO.fromJson(v));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of GeoPointDTO-objects as value to a dart map
|
||||
static Map<String, List<GeoPointDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<GeoPointDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = GeoPointDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
107
manager_api/lib/model/image_dto.dart
Normal file
107
manager_api/lib/model/image_dto.dart
Normal file
@ -0,0 +1,107 @@
|
||||
//
|
||||
// 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 ImageDTO {
|
||||
/// Returns a new [ImageDTO] instance.
|
||||
ImageDTO({
|
||||
this.title,
|
||||
this.description,
|
||||
this.resourceId,
|
||||
this.source_,
|
||||
this.order,
|
||||
});
|
||||
|
||||
List<TranslationDTO> title;
|
||||
|
||||
List<TranslationDTO> description;
|
||||
|
||||
String resourceId;
|
||||
|
||||
String source_;
|
||||
|
||||
int order;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ImageDTO &&
|
||||
other.title == title &&
|
||||
other.description == description &&
|
||||
other.resourceId == resourceId &&
|
||||
other.source_ == source_ &&
|
||||
other.order == order;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
(title == null ? 0 : title.hashCode) +
|
||||
(description == null ? 0 : description.hashCode) +
|
||||
(resourceId == null ? 0 : resourceId.hashCode) +
|
||||
(source_ == null ? 0 : source_.hashCode) +
|
||||
(order == null ? 0 : order.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ImageDTO[title=$title, description=$description, resourceId=$resourceId, source_=$source_, order=$order]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (title != null) {
|
||||
json[r'title'] = title;
|
||||
}
|
||||
if (description != null) {
|
||||
json[r'description'] = description;
|
||||
}
|
||||
if (resourceId != null) {
|
||||
json[r'resourceId'] = resourceId;
|
||||
}
|
||||
if (source_ != null) {
|
||||
json[r'source'] = source_;
|
||||
}
|
||||
if (order != null) {
|
||||
json[r'order'] = order;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ImageDTO] instance and imports its values from
|
||||
/// [json] if it's non-null, null if [json] is null.
|
||||
static ImageDTO fromJson(Map<String, dynamic> json) => json == null
|
||||
? null
|
||||
: ImageDTO(
|
||||
title: TranslationDTO.listFromJson(json[r'title']),
|
||||
description: TranslationDTO.listFromJson(json[r'description']),
|
||||
resourceId: json[r'resourceId'],
|
||||
source_: json[r'source'],
|
||||
order: json[r'order'],
|
||||
);
|
||||
|
||||
static List<ImageDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ImageDTO>[]
|
||||
: json.map((v) => ImageDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ImageDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ImageDTO>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = ImageDTO.fromJson(v));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ImageDTO-objects as value to a dart map
|
||||
static Map<String, List<ImageDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ImageDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = ImageDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
80
manager_api/lib/model/image_geo_point.dart
Normal file
80
manager_api/lib/model/image_geo_point.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 ImageGeoPoint {
|
||||
/// Returns a new [ImageGeoPoint] instance.
|
||||
ImageGeoPoint({
|
||||
this.imageResourceId,
|
||||
this.imageSource,
|
||||
});
|
||||
|
||||
String imageResourceId;
|
||||
|
||||
String imageSource;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ImageGeoPoint &&
|
||||
other.imageResourceId == imageResourceId &&
|
||||
other.imageSource == imageSource;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
(imageResourceId == null ? 0 : imageResourceId.hashCode) +
|
||||
(imageSource == null ? 0 : imageSource.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ImageGeoPoint[imageResourceId=$imageResourceId, imageSource=$imageSource]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (imageResourceId != null) {
|
||||
json[r'imageResourceId'] = imageResourceId;
|
||||
}
|
||||
if (imageSource != null) {
|
||||
json[r'imageSource'] = imageSource;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ImageGeoPoint] instance and imports its values from
|
||||
/// [json] if it's non-null, null if [json] is null.
|
||||
static ImageGeoPoint fromJson(Map<String, dynamic> json) => json == null
|
||||
? null
|
||||
: ImageGeoPoint(
|
||||
imageResourceId: json[r'imageResourceId'],
|
||||
imageSource: json[r'imageSource'],
|
||||
);
|
||||
|
||||
static List<ImageGeoPoint> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ImageGeoPoint>[]
|
||||
: json.map((v) => ImageGeoPoint.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ImageGeoPoint> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ImageGeoPoint>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = ImageGeoPoint.fromJson(v));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ImageGeoPoint-objects as value to a dart map
|
||||
static Map<String, List<ImageGeoPoint>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ImageGeoPoint>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = ImageGeoPoint.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
89
manager_api/lib/model/level_dto.dart
Normal file
89
manager_api/lib/model/level_dto.dart
Normal file
@ -0,0 +1,89 @@
|
||||
//
|
||||
// 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 LevelDTO {
|
||||
/// Returns a new [LevelDTO] instance.
|
||||
LevelDTO({
|
||||
this.label,
|
||||
this.resourceId,
|
||||
this.source_,
|
||||
});
|
||||
|
||||
List<TranslationDTO> label;
|
||||
|
||||
String resourceId;
|
||||
|
||||
String source_;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is LevelDTO &&
|
||||
other.label == label &&
|
||||
other.resourceId == resourceId &&
|
||||
other.source_ == source_;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
(label == null ? 0 : label.hashCode) +
|
||||
(resourceId == null ? 0 : resourceId.hashCode) +
|
||||
(source_ == null ? 0 : source_.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'LevelDTO[label=$label, resourceId=$resourceId, source_=$source_]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (label != null) {
|
||||
json[r'label'] = label;
|
||||
}
|
||||
if (resourceId != null) {
|
||||
json[r'resourceId'] = resourceId;
|
||||
}
|
||||
if (source_ != null) {
|
||||
json[r'source'] = source_;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [LevelDTO] instance and imports its values from
|
||||
/// [json] if it's non-null, null if [json] is null.
|
||||
static LevelDTO fromJson(Map<String, dynamic> json) => json == null
|
||||
? null
|
||||
: LevelDTO(
|
||||
label: TranslationDTO.listFromJson(json[r'label']),
|
||||
resourceId: json[r'resourceId'],
|
||||
source_: json[r'source'],
|
||||
);
|
||||
|
||||
static List<LevelDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <LevelDTO>[]
|
||||
: json.map((v) => LevelDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, LevelDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, LevelDTO>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = LevelDTO.fromJson(v));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of LevelDTO-objects as value to a dart map
|
||||
static Map<String, List<LevelDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<LevelDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = LevelDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
80
manager_api/lib/model/login_dto.dart
Normal file
80
manager_api/lib/model/login_dto.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 LoginDTO {
|
||||
/// Returns a new [LoginDTO] instance.
|
||||
LoginDTO({
|
||||
this.email,
|
||||
this.password,
|
||||
});
|
||||
|
||||
String email;
|
||||
|
||||
String password;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is LoginDTO &&
|
||||
other.email == email &&
|
||||
other.password == password;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
(email == null ? 0 : email.hashCode) +
|
||||
(password == null ? 0 : password.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'LoginDTO[email=$email, password=$password]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (email != null) {
|
||||
json[r'email'] = email;
|
||||
}
|
||||
if (password != null) {
|
||||
json[r'password'] = password;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [LoginDTO] instance and imports its values from
|
||||
/// [json] if it's non-null, null if [json] is null.
|
||||
static LoginDTO fromJson(Map<String, dynamic> json) => json == null
|
||||
? null
|
||||
: LoginDTO(
|
||||
email: json[r'email'],
|
||||
password: json[r'password'],
|
||||
);
|
||||
|
||||
static List<LoginDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <LoginDTO>[]
|
||||
: json.map((v) => LoginDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, LoginDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, LoginDTO>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = LoginDTO.fromJson(v));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of LoginDTO-objects as value to a dart map
|
||||
static Map<String, List<LoginDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<LoginDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = LoginDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
107
manager_api/lib/model/map_dto.dart
Normal file
107
manager_api/lib/model/map_dto.dart
Normal file
@ -0,0 +1,107 @@
|
||||
//
|
||||
// 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 MapDTO {
|
||||
/// Returns a new [MapDTO] instance.
|
||||
MapDTO({
|
||||
this.zoom,
|
||||
this.mapType,
|
||||
this.points,
|
||||
this.iconResourceId,
|
||||
this.iconSource,
|
||||
});
|
||||
|
||||
int zoom;
|
||||
|
||||
MapTypeApp mapType;
|
||||
|
||||
List<GeoPointDTO> points;
|
||||
|
||||
String iconResourceId;
|
||||
|
||||
String iconSource;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is MapDTO &&
|
||||
other.zoom == zoom &&
|
||||
other.mapType == mapType &&
|
||||
other.points == points &&
|
||||
other.iconResourceId == iconResourceId &&
|
||||
other.iconSource == iconSource;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
(zoom == null ? 0 : zoom.hashCode) +
|
||||
(mapType == null ? 0 : mapType.hashCode) +
|
||||
(points == null ? 0 : points.hashCode) +
|
||||
(iconResourceId == null ? 0 : iconResourceId.hashCode) +
|
||||
(iconSource == null ? 0 : iconSource.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'MapDTO[zoom=$zoom, mapType=$mapType, points=$points, iconResourceId=$iconResourceId, iconSource=$iconSource]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (zoom != null) {
|
||||
json[r'zoom'] = zoom;
|
||||
}
|
||||
if (mapType != null) {
|
||||
json[r'mapType'] = mapType;
|
||||
}
|
||||
if (points != null) {
|
||||
json[r'points'] = points;
|
||||
}
|
||||
if (iconResourceId != null) {
|
||||
json[r'iconResourceId'] = iconResourceId;
|
||||
}
|
||||
if (iconSource != null) {
|
||||
json[r'iconSource'] = iconSource;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [MapDTO] instance and imports its values from
|
||||
/// [json] if it's non-null, null if [json] is null.
|
||||
static MapDTO fromJson(Map<String, dynamic> json) => json == null
|
||||
? null
|
||||
: MapDTO(
|
||||
zoom: json[r'zoom'],
|
||||
mapType: MapTypeApp.fromJson(json[r'mapType']),
|
||||
points: GeoPointDTO.listFromJson(json[r'points']),
|
||||
iconResourceId: json[r'iconResourceId'],
|
||||
iconSource: json[r'iconSource'],
|
||||
);
|
||||
|
||||
static List<MapDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <MapDTO>[]
|
||||
: json.map((v) => MapDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, MapDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, MapDTO>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = MapDTO.fromJson(v));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of MapDTO-objects as value to a dart map
|
||||
static Map<String, List<MapDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<MapDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = MapDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
85
manager_api/lib/model/map_type.dart
Normal file
85
manager_api/lib/model/map_type.dart
Normal file
@ -0,0 +1,85 @@
|
||||
//
|
||||
// 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 MapType {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const MapType._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const none = MapType._(r'none');
|
||||
static const normal = MapType._(r'normal');
|
||||
static const satellite = MapType._(r'satellite');
|
||||
static const terrain = MapType._(r'terrain');
|
||||
static const hybrid = MapType._(r'hybrid');
|
||||
|
||||
/// List of all possible values in this [enum][MapType].
|
||||
static const values = <MapType>[
|
||||
none,
|
||||
normal,
|
||||
satellite,
|
||||
terrain,
|
||||
hybrid,
|
||||
];
|
||||
|
||||
static MapType fromJson(dynamic value) =>
|
||||
MapTypeTypeTransformer().decode(value);
|
||||
|
||||
static List<MapType> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <MapType>[]
|
||||
: json
|
||||
.map((value) => MapType.fromJson(value))
|
||||
.toList(growable: true == growable);
|
||||
}
|
||||
|
||||
/// Transformation class that can [encode] an instance of [MapType] to String,
|
||||
/// and [decode] dynamic data back to [MapType].
|
||||
class MapTypeTypeTransformer {
|
||||
const MapTypeTypeTransformer._();
|
||||
|
||||
factory MapTypeTypeTransformer() => _instance ??= MapTypeTypeTransformer._();
|
||||
|
||||
String encode(MapType data) => data.value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a MapType.
|
||||
///
|
||||
/// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully,
|
||||
/// then null is returned. However, if [allowNull] is false and the [dynamic value][data]
|
||||
/// cannot be decoded successfully, then an [UnimplementedError] is thrown.
|
||||
///
|
||||
/// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
|
||||
/// and users are still using an old app with the old code.
|
||||
MapType decode(dynamic data, {bool allowNull}) {
|
||||
switch (data) {
|
||||
case r'none': return MapType.none;
|
||||
case r'normal': return MapType.normal;
|
||||
case r'satellite': return MapType.satellite;
|
||||
case r'terrain': return MapType.terrain;
|
||||
case r'hybrid': return MapType.hybrid;
|
||||
default:
|
||||
if (allowNull == false) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [MapTypeTypeTransformer] instance.
|
||||
static MapTypeTypeTransformer _instance;
|
||||
}
|
||||
85
manager_api/lib/model/map_type_app.dart
Normal file
85
manager_api/lib/model/map_type_app.dart
Normal file
@ -0,0 +1,85 @@
|
||||
//
|
||||
// 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 MapTypeApp {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const MapTypeApp._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const none = MapTypeApp._(r'none');
|
||||
static const normal = MapTypeApp._(r'normal');
|
||||
static const satellite = MapTypeApp._(r'satellite');
|
||||
static const terrain = MapTypeApp._(r'terrain');
|
||||
static const hybrid = MapTypeApp._(r'hybrid');
|
||||
|
||||
/// List of all possible values in this [enum][MapTypeApp].
|
||||
static const values = <MapTypeApp>[
|
||||
none,
|
||||
normal,
|
||||
satellite,
|
||||
terrain,
|
||||
hybrid,
|
||||
];
|
||||
|
||||
static MapTypeApp fromJson(dynamic value) =>
|
||||
MapTypeAppTypeTransformer().decode(value);
|
||||
|
||||
static List<MapTypeApp> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <MapTypeApp>[]
|
||||
: json
|
||||
.map((value) => MapTypeApp.fromJson(value))
|
||||
.toList(growable: true == growable);
|
||||
}
|
||||
|
||||
/// Transformation class that can [encode] an instance of [MapTypeApp] to String,
|
||||
/// and [decode] dynamic data back to [MapTypeApp].
|
||||
class MapTypeAppTypeTransformer {
|
||||
const MapTypeAppTypeTransformer._();
|
||||
|
||||
factory MapTypeAppTypeTransformer() => _instance ??= MapTypeAppTypeTransformer._();
|
||||
|
||||
String encode(MapTypeApp data) => data.value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a MapTypeApp.
|
||||
///
|
||||
/// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully,
|
||||
/// then null is returned. However, if [allowNull] is false and the [dynamic value][data]
|
||||
/// cannot be decoded successfully, then an [UnimplementedError] is thrown.
|
||||
///
|
||||
/// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
|
||||
/// and users are still using an old app with the old code.
|
||||
MapTypeApp decode(dynamic data, {bool allowNull}) {
|
||||
switch (data) {
|
||||
case r'none': return MapTypeApp.none;
|
||||
case r'normal': return MapTypeApp.normal;
|
||||
case r'satellite': return MapTypeApp.satellite;
|
||||
case r'terrain': return MapTypeApp.terrain;
|
||||
case r'hybrid': return MapTypeApp.hybrid;
|
||||
default:
|
||||
if (allowNull == false) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [MapTypeAppTypeTransformer] instance.
|
||||
static MapTypeAppTypeTransformer _instance;
|
||||
}
|
||||
71
manager_api/lib/model/menu_dto.dart
Normal file
71
manager_api/lib/model/menu_dto.dart
Normal file
@ -0,0 +1,71 @@
|
||||
//
|
||||
// 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 MenuDTO {
|
||||
/// Returns a new [MenuDTO] instance.
|
||||
MenuDTO({
|
||||
this.sections,
|
||||
});
|
||||
|
||||
List<SectionDTO> sections;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is MenuDTO &&
|
||||
other.sections == sections;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
(sections == null ? 0 : sections.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'MenuDTO[sections=$sections]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (sections != null) {
|
||||
json[r'sections'] = sections;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [MenuDTO] instance and imports its values from
|
||||
/// [json] if it's non-null, null if [json] is null.
|
||||
static MenuDTO fromJson(Map<String, dynamic> json) => json == null
|
||||
? null
|
||||
: MenuDTO(
|
||||
sections: SectionDTO.listFromJson(json[r'sections']),
|
||||
);
|
||||
|
||||
static List<MenuDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <MenuDTO>[]
|
||||
: json.map((v) => MenuDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, MenuDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, MenuDTO>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = MenuDTO.fromJson(v));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of MenuDTO-objects as value to a dart map
|
||||
static Map<String, List<MenuDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<MenuDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = MenuDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
80
manager_api/lib/model/player_message_dto.dart
Normal file
80
manager_api/lib/model/player_message_dto.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 PlayerMessageDTO {
|
||||
/// Returns a new [PlayerMessageDTO] instance.
|
||||
PlayerMessageDTO({
|
||||
this.configChanged,
|
||||
this.isDeleted,
|
||||
});
|
||||
|
||||
bool configChanged;
|
||||
|
||||
bool isDeleted;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is PlayerMessageDTO &&
|
||||
other.configChanged == configChanged &&
|
||||
other.isDeleted == isDeleted;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
(configChanged == null ? 0 : configChanged.hashCode) +
|
||||
(isDeleted == null ? 0 : isDeleted.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'PlayerMessageDTO[configChanged=$configChanged, isDeleted=$isDeleted]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (configChanged != null) {
|
||||
json[r'configChanged'] = configChanged;
|
||||
}
|
||||
if (isDeleted != null) {
|
||||
json[r'isDeleted'] = isDeleted;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [PlayerMessageDTO] instance and imports its values from
|
||||
/// [json] if it's non-null, null if [json] is null.
|
||||
static PlayerMessageDTO fromJson(Map<String, dynamic> json) => json == null
|
||||
? null
|
||||
: PlayerMessageDTO(
|
||||
configChanged: json[r'configChanged'],
|
||||
isDeleted: json[r'isDeleted'],
|
||||
);
|
||||
|
||||
static List<PlayerMessageDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <PlayerMessageDTO>[]
|
||||
: json.map((v) => PlayerMessageDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, PlayerMessageDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, PlayerMessageDTO>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = PlayerMessageDTO.fromJson(v));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of PlayerMessageDTO-objects as value to a dart map
|
||||
static Map<String, List<PlayerMessageDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<PlayerMessageDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = PlayerMessageDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
107
manager_api/lib/model/question_dto.dart
Normal file
107
manager_api/lib/model/question_dto.dart
Normal file
@ -0,0 +1,107 @@
|
||||
//
|
||||
// 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 QuestionDTO {
|
||||
/// Returns a new [QuestionDTO] instance.
|
||||
QuestionDTO({
|
||||
this.label,
|
||||
this.responses,
|
||||
this.resourceId,
|
||||
this.source_,
|
||||
this.order,
|
||||
});
|
||||
|
||||
List<TranslationDTO> label;
|
||||
|
||||
List<ResponseDTO> responses;
|
||||
|
||||
String resourceId;
|
||||
|
||||
String source_;
|
||||
|
||||
int order;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is QuestionDTO &&
|
||||
other.label == label &&
|
||||
other.responses == responses &&
|
||||
other.resourceId == resourceId &&
|
||||
other.source_ == source_ &&
|
||||
other.order == order;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
(label == null ? 0 : label.hashCode) +
|
||||
(responses == null ? 0 : responses.hashCode) +
|
||||
(resourceId == null ? 0 : resourceId.hashCode) +
|
||||
(source_ == null ? 0 : source_.hashCode) +
|
||||
(order == null ? 0 : order.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'QuestionDTO[label=$label, responses=$responses, resourceId=$resourceId, source_=$source_, order=$order]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (label != null) {
|
||||
json[r'label'] = label;
|
||||
}
|
||||
if (responses != null) {
|
||||
json[r'responses'] = responses;
|
||||
}
|
||||
if (resourceId != null) {
|
||||
json[r'resourceId'] = resourceId;
|
||||
}
|
||||
if (source_ != null) {
|
||||
json[r'source'] = source_;
|
||||
}
|
||||
if (order != null) {
|
||||
json[r'order'] = order;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [QuestionDTO] instance and imports its values from
|
||||
/// [json] if it's non-null, null if [json] is null.
|
||||
static QuestionDTO fromJson(Map<String, dynamic> json) => json == null
|
||||
? null
|
||||
: QuestionDTO(
|
||||
label: TranslationDTO.listFromJson(json[r'label']),
|
||||
responses: ResponseDTO.listFromJson(json[r'responses']),
|
||||
resourceId: json[r'resourceId'],
|
||||
source_: json[r'source'],
|
||||
order: json[r'order'],
|
||||
);
|
||||
|
||||
static List<QuestionDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <QuestionDTO>[]
|
||||
: json.map((v) => QuestionDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, QuestionDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, QuestionDTO>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = QuestionDTO.fromJson(v));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of QuestionDTO-objects as value to a dart map
|
||||
static Map<String, List<QuestionDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<QuestionDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = QuestionDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
107
manager_api/lib/model/quizz_dto.dart
Normal file
107
manager_api/lib/model/quizz_dto.dart
Normal file
@ -0,0 +1,107 @@
|
||||
//
|
||||
// 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 QuizzDTO {
|
||||
/// Returns a new [QuizzDTO] instance.
|
||||
QuizzDTO({
|
||||
this.questions,
|
||||
this.badLevel,
|
||||
this.mediumLevel,
|
||||
this.goodLevel,
|
||||
this.greatLevel,
|
||||
});
|
||||
|
||||
List<QuestionDTO> questions;
|
||||
|
||||
LevelDTO badLevel;
|
||||
|
||||
LevelDTO mediumLevel;
|
||||
|
||||
LevelDTO goodLevel;
|
||||
|
||||
LevelDTO greatLevel;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is QuizzDTO &&
|
||||
other.questions == questions &&
|
||||
other.badLevel == badLevel &&
|
||||
other.mediumLevel == mediumLevel &&
|
||||
other.goodLevel == goodLevel &&
|
||||
other.greatLevel == greatLevel;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
(questions == null ? 0 : questions.hashCode) +
|
||||
(badLevel == null ? 0 : badLevel.hashCode) +
|
||||
(mediumLevel == null ? 0 : mediumLevel.hashCode) +
|
||||
(goodLevel == null ? 0 : goodLevel.hashCode) +
|
||||
(greatLevel == null ? 0 : greatLevel.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'QuizzDTO[questions=$questions, badLevel=$badLevel, mediumLevel=$mediumLevel, goodLevel=$goodLevel, greatLevel=$greatLevel]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (questions != null) {
|
||||
json[r'questions'] = questions;
|
||||
}
|
||||
if (badLevel != null) {
|
||||
json[r'bad_level'] = badLevel;
|
||||
}
|
||||
if (mediumLevel != null) {
|
||||
json[r'medium_level'] = mediumLevel;
|
||||
}
|
||||
if (goodLevel != null) {
|
||||
json[r'good_level'] = goodLevel;
|
||||
}
|
||||
if (greatLevel != null) {
|
||||
json[r'great_level'] = greatLevel;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [QuizzDTO] instance and imports its values from
|
||||
/// [json] if it's non-null, null if [json] is null.
|
||||
static QuizzDTO fromJson(Map<String, dynamic> json) => json == null
|
||||
? null
|
||||
: QuizzDTO(
|
||||
questions: QuestionDTO.listFromJson(json[r'questions']),
|
||||
badLevel: LevelDTO.fromJson(json[r'bad_level']),
|
||||
mediumLevel: LevelDTO.fromJson(json[r'medium_level']),
|
||||
goodLevel: LevelDTO.fromJson(json[r'good_level']),
|
||||
greatLevel: LevelDTO.fromJson(json[r'great_level']),
|
||||
);
|
||||
|
||||
static List<QuizzDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <QuizzDTO>[]
|
||||
: json.map((v) => QuizzDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, QuizzDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, QuizzDTO>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = QuizzDTO.fromJson(v));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of QuizzDTO-objects as value to a dart map
|
||||
static Map<String, List<QuizzDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<QuizzDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = QuizzDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
109
manager_api/lib/model/resource_detail_dto.dart
Normal file
109
manager_api/lib/model/resource_detail_dto.dart
Normal file
@ -0,0 +1,109 @@
|
||||
//
|
||||
// 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 ResourceDetailDTO {
|
||||
/// Returns a new [ResourceDetailDTO] instance.
|
||||
ResourceDetailDTO({
|
||||
this.id,
|
||||
this.type,
|
||||
this.label,
|
||||
this.dateCreation,
|
||||
this.data,
|
||||
});
|
||||
|
||||
String id;
|
||||
|
||||
ResourceType type;
|
||||
|
||||
String label;
|
||||
|
||||
DateTime dateCreation;
|
||||
|
||||
String data;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ResourceDetailDTO &&
|
||||
other.id == id &&
|
||||
other.type == type &&
|
||||
other.label == label &&
|
||||
other.dateCreation == dateCreation &&
|
||||
other.data == data;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
(id == null ? 0 : id.hashCode) +
|
||||
(type == null ? 0 : type.hashCode) +
|
||||
(label == null ? 0 : label.hashCode) +
|
||||
(dateCreation == null ? 0 : dateCreation.hashCode) +
|
||||
(data == null ? 0 : data.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ResourceDetailDTO[id=$id, type=$type, label=$label, dateCreation=$dateCreation, data=$data]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (id != null) {
|
||||
json[r'id'] = id;
|
||||
}
|
||||
if (type != null) {
|
||||
json[r'type'] = type;
|
||||
}
|
||||
if (label != null) {
|
||||
json[r'label'] = label;
|
||||
}
|
||||
if (dateCreation != null) {
|
||||
json[r'dateCreation'] = dateCreation.toUtc().toIso8601String();
|
||||
}
|
||||
if (data != null) {
|
||||
json[r'data'] = data;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ResourceDetailDTO] instance and imports its values from
|
||||
/// [json] if it's non-null, null if [json] is null.
|
||||
static ResourceDetailDTO fromJson(Map<String, dynamic> json) => json == null
|
||||
? null
|
||||
: ResourceDetailDTO(
|
||||
id: json[r'id'],
|
||||
type: ResourceType.fromJson(json[r'type']),
|
||||
label: json[r'label'],
|
||||
dateCreation: json[r'dateCreation'] == null
|
||||
? null
|
||||
: DateTime.parse(json[r'dateCreation']),
|
||||
data: json[r'data'],
|
||||
);
|
||||
|
||||
static List<ResourceDetailDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ResourceDetailDTO>[]
|
||||
: json.map((v) => ResourceDetailDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ResourceDetailDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ResourceDetailDTO>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) => map[key] = ResourceDetailDTO.fromJson(v));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ResourceDetailDTO-objects as value to a dart map
|
||||
static Map<String, List<ResourceDetailDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ResourceDetailDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = ResourceDetailDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
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