26 lines
705 B
Dart
26 lines
705 B
Dart
import 'package:http/http.dart' as http;
|
|
import 'package:http/http.dart';
|
|
|
|
import '../../../api_params.dart';
|
|
import '../../nextcloud_ocs.dart';
|
|
import '../talk_api.dart';
|
|
import 'get_reactions_response.dart';
|
|
|
|
class GetReactions extends TalkApi<GetReactionsResponse> {
|
|
String chatToken;
|
|
int messageId;
|
|
GetReactions({required this.chatToken, required this.messageId})
|
|
: super('v1/reaction/$chatToken/$messageId', null);
|
|
|
|
@override
|
|
GetReactionsResponse assemble(String raw) =>
|
|
GetReactionsResponse.fromJson(NextcloudOcs.decode(raw));
|
|
|
|
@override
|
|
Future<Response>? request(
|
|
Uri uri,
|
|
ApiParams? body,
|
|
Map<String, String>? headers,
|
|
) => http.get(uri, headers: headers);
|
|
}
|