22 lines
641 B
Dart
22 lines
641 B
Dart
import 'dart:convert';
|
|
|
|
import 'package:http/http.dart' as http;
|
|
import 'package:http/http.dart';
|
|
|
|
import '../../../apiParams.dart';
|
|
import '../talkApi.dart';
|
|
import 'getReactionsResponse.dart';
|
|
|
|
class GetReactions extends TalkApi<GetReactionsResponse> {
|
|
String chatToken;
|
|
int messageId;
|
|
GetReactions({required this.chatToken, required this.messageId}) : super('v1/reaction/$chatToken/$messageId', null);
|
|
|
|
@override
|
|
assemble(String raw) => GetReactionsResponse.fromJson(jsonDecode(raw)['ocs']);
|
|
|
|
@override
|
|
Future<Response>? request(Uri uri, ApiParams? body, Map<String, String>? headers) => http.get(uri, headers: headers);
|
|
|
|
}
|