Added api for custom timetable events
This commit is contained in:
@ -0,0 +1,24 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:http/http.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
import '../../mhslApi.dart';
|
||||
import 'addCustomTimetableEventParams.dart';
|
||||
|
||||
class AddCustomTimetableEvent extends MhslApi<void> {
|
||||
AddCustomTimetableEventParams params;
|
||||
|
||||
AddCustomTimetableEvent(this.params) : super('server/timetable/customEvents');
|
||||
|
||||
@override
|
||||
void assemble(String raw) {}
|
||||
|
||||
@override
|
||||
Future<Response>? request(Uri uri) {
|
||||
String body = jsonEncode(params.toJson());
|
||||
log(body);
|
||||
return http.post(uri, body: body);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user