31 lines
1006 B
Dart
31 lines
1006 B
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
part 'getReactionsResponse.g.dart';
|
|
|
|
@JsonSerializable(explicitToJson: true)
|
|
class GetReactionsResponse {
|
|
Map<String, List<GetReactionsResponseObject>> data;
|
|
|
|
GetReactionsResponse(this.data);
|
|
|
|
factory GetReactionsResponse.fromJson(Map<String, dynamic> json) => _$GetReactionsResponseFromJson(json);
|
|
Map<String, dynamic> toJson() => _$GetReactionsResponseToJson(this);
|
|
}
|
|
|
|
@JsonSerializable()
|
|
class GetReactionsResponseObject {
|
|
GetReactionsResponseObjectActorType actorType;
|
|
String actorId;
|
|
String actorDisplayName;
|
|
int timestamp;
|
|
|
|
GetReactionsResponseObject(this.actorType, this.actorId, this.actorDisplayName, this.timestamp);
|
|
|
|
factory GetReactionsResponseObject.fromJson(Map<String, dynamic> json) => _$GetReactionsResponseObjectFromJson(json);
|
|
Map<String, dynamic> toJson() => _$GetReactionsResponseObjectToJson(this);
|
|
}
|
|
|
|
enum GetReactionsResponseObjectActorType {
|
|
@JsonValue("guests") guests,
|
|
@JsonValue("users") users,
|
|
} |