Implement local HTTP Api usage
This commit is contained in:
29
lib/api/webuntis/queries/getRooms/getRoomsResponse.dart
Normal file
29
lib/api/webuntis/queries/getRooms/getRoomsResponse.dart
Normal file
@ -0,0 +1,29 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:marianum_mobile/api/webuntis/apiResponse.dart';
|
||||
|
||||
part 'getRoomsResponse.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class GetRoomsResponse extends ApiResponse {
|
||||
Set<GetRoomsResponseObject> result;
|
||||
|
||||
GetRoomsResponse(this.result);
|
||||
|
||||
factory GetRoomsResponse.fromJson(Map<String, dynamic> json) => _$GetRoomsResponseFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$GetRoomsResponseToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class GetRoomsResponseObject {
|
||||
int id;
|
||||
String name;
|
||||
String longName;
|
||||
bool active;
|
||||
String building;
|
||||
|
||||
|
||||
GetRoomsResponseObject(this.id, this.name, this.longName, this.active, this.building);
|
||||
|
||||
factory GetRoomsResponseObject.fromJson(Map<String, dynamic> json) => _$GetRoomsResponseObjectFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$GetRoomsResponseObjectToJson(this);
|
||||
}
|
Reference in New Issue
Block a user