mirror of
https://github.com/krawieck/lemmur/
synced 2024-12-18 03:18:48 +01:00
26 lines
564 B
Dart
26 lines
564 B
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
part 'captcha.g.dart';
|
|
|
|
/// based on https://dev.lemmy.ml/docs/contributing_websocket_http_api.html#get-captcha
|
|
@JsonSerializable(fieldRename: FieldRename.snake, createToJson: false)
|
|
class Captcha {
|
|
final String png;
|
|
|
|
/// can be null
|
|
final String wav;
|
|
final String uuid;
|
|
|
|
const Captcha({
|
|
/// A Base64 encoded png
|
|
this.png,
|
|
|
|
/// A Base64 encoded wav audio file
|
|
this.wav,
|
|
this.uuid,
|
|
});
|
|
|
|
factory Captcha.fromJson(Map<String, dynamic> json) =>
|
|
_$CaptchaFromJson(json);
|
|
}
|