2020-08-10 14:36:30 +02:00
|
|
|
import 'package:json_annotation/json_annotation.dart';
|
2020-08-10 00:42:31 +02:00
|
|
|
|
2020-08-10 14:22:28 +02:00
|
|
|
part 'captcha.g.dart';
|
|
|
|
|
|
|
|
/// based on https://dev.lemmy.ml/docs/contributing_websocket_http_api.html#get-captcha
|
|
|
|
@JsonSerializable(fieldRename: FieldRename.snake, createToJson: false)
|
2020-08-10 00:42:31 +02:00
|
|
|
class Captcha {
|
|
|
|
final String png;
|
|
|
|
|
|
|
|
/// can be null
|
|
|
|
final String wav;
|
|
|
|
final String uuid;
|
2020-08-10 14:22:28 +02:00
|
|
|
|
|
|
|
const Captcha({
|
|
|
|
this.png,
|
|
|
|
this.wav,
|
|
|
|
this.uuid
|
|
|
|
});
|
|
|
|
|
|
|
|
factory Captcha.fromJson(Map<String, dynamic> json) =>
|
|
|
|
_$CaptchaFromJson(json);
|
2020-08-10 00:42:31 +02:00
|
|
|
}
|