32 lines
723 B
Dart
32 lines
723 B
Dart
import 'package:http/http.dart' as http;
|
|
import 'package:http/http.dart';
|
|
|
|
import '../../../api_params.dart';
|
|
import '../talk_api.dart';
|
|
import 'react_message_params.dart';
|
|
|
|
class ReactMessage extends TalkApi {
|
|
String chatToken;
|
|
int messageId;
|
|
ReactMessage({
|
|
required this.chatToken,
|
|
required this.messageId,
|
|
required ReactMessageParams params,
|
|
}) : super('v1/reaction/$chatToken/$messageId', params);
|
|
|
|
@override
|
|
Null assemble(String raw) => null;
|
|
|
|
@override
|
|
Future<Response>? request(
|
|
Uri uri,
|
|
ApiParams? body,
|
|
Map<String, String>? headers,
|
|
) {
|
|
if (body is ReactMessageParams) {
|
|
return http.post(uri, headers: headers, body: body.toJson());
|
|
}
|
|
return null;
|
|
}
|
|
}
|