Webdav and Cleanup
This commit is contained in:
parent
09003439a6
commit
88e5a605fb
@ -16,14 +16,11 @@ class GetRoom extends TalkApi<GetRoomResponse> {
|
||||
|
||||
@override
|
||||
GetRoomResponse assemble(String raw) {
|
||||
log("ASSEMBLING");
|
||||
log(raw);
|
||||
return GetRoomResponse.fromJson(jsonDecode(raw)['ocs']);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<http.Response> request(Uri uri, Object? body, Map<String, String>? headers) {
|
||||
log("REQUSTING...");
|
||||
log(uri.toString());
|
||||
log(headers.toString());
|
||||
return http.get(uri, headers: headers);
|
||||
|
@ -14,13 +14,11 @@ class GetRoomCache extends RequestCache<GetRoomResponse> {
|
||||
|
||||
@override
|
||||
GetRoomResponse onLocalData(String json) {
|
||||
log("LOCAL DATA FOUND");
|
||||
return GetRoomResponse.fromJson(jsonDecode(json));
|
||||
}
|
||||
|
||||
@override
|
||||
Future<GetRoomResponse> onLoad() {
|
||||
log("FETCHING DATA");
|
||||
return GetRoom(
|
||||
GetRoomParams(
|
||||
includeStatus: true,
|
||||
|
@ -1,9 +1,43 @@
|
||||
import 'package:marianum_mobile/api/apiRequest.dart';
|
||||
|
||||
class WebdavApi extends ApiRequest {
|
||||
String basePath;
|
||||
|
||||
WebdavApi(this.basePath);
|
||||
|
||||
|
||||
}
|
||||
// import 'dart:developer';
|
||||
//
|
||||
// import 'package:marianum_mobile/api/apiParams.dart';
|
||||
// import 'package:marianum_mobile/api/apiRequest.dart';
|
||||
// import 'package:marianum_mobile/api/webuntis/queries/authenticate/authenticate.dart';
|
||||
// import 'package:shared_preferences/shared_preferences.dart';
|
||||
// import 'package:webdav_client/webdav_client.dart';
|
||||
//
|
||||
// import '../../apiResponse.dart';
|
||||
//
|
||||
// abstract class WebdavApi<T> extends ApiRequest {
|
||||
// T genericParams;
|
||||
//
|
||||
// WebdavApi(this.genericParams) {
|
||||
// establishWebdavConnection();
|
||||
// }
|
||||
//
|
||||
// Future<ApiResponse> run();
|
||||
//
|
||||
// static Future<Client> webdav = establishWebdavConnection();
|
||||
//
|
||||
// static Future<Client> establishWebdavConnection() async {
|
||||
// SharedPreferences preferences = await SharedPreferences.getInstance();
|
||||
//
|
||||
// // Client client = newClient(
|
||||
// // "https://cloud.marianum-fulda.de/remote.php/dav/files/***REMOVED***/",
|
||||
// // user: "***REMOVED***",
|
||||
// // password: "***REMOVED***",
|
||||
// // debug: true
|
||||
// // );
|
||||
// //
|
||||
// // client.setHeaders(
|
||||
// // {
|
||||
// // "Authorization": "Bearer",
|
||||
// // "User-Agent": "Marianum Fulda/Alpha0.1 (Development build) ; https://mhsl.eu/id.html",
|
||||
// // }
|
||||
// // );
|
||||
//
|
||||
// throw UnimplementedError();
|
||||
// //return client;
|
||||
//
|
||||
// }
|
||||
// }
|
Loading…
x
Reference in New Issue
Block a user