Implement Webuntis HTTP Api and Display
This commit is contained in:
@ -0,0 +1,28 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:marianum_mobile/api/webuntis/apiResponse.dart';
|
||||
|
||||
part 'getSubjectsResponse.g.dart';
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class GetSubjectsResponse extends ApiResponse {
|
||||
Set<GetSubjectsResponseObject> result;
|
||||
|
||||
GetSubjectsResponse(this.result);
|
||||
|
||||
factory GetSubjectsResponse.fromJson(Map<String, dynamic> json) => _$GetSubjectsResponseFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$GetSubjectsResponseToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class GetSubjectsResponseObject {
|
||||
int id;
|
||||
String name;
|
||||
String longName;
|
||||
String alternateName;
|
||||
bool active;
|
||||
|
||||
GetSubjectsResponseObject(this.id, this.name, this.longName, this.alternateName, this.active);
|
||||
|
||||
factory GetSubjectsResponseObject.fromJson(Map<String, dynamic> json) => _$GetSubjectsResponseObjectFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$GetSubjectsResponseObjectToJson(this);
|
||||
}
|
Reference in New Issue
Block a user