Added details for chats with participants list

This commit is contained in:
2023-09-13 18:57:52 +02:00
parent 3b673537e5
commit 0b48c2e7ab
13 changed files with 380 additions and 20 deletions

View File

@ -0,0 +1,22 @@
import 'dart:convert';
import 'package:http/http.dart' as http;
import '../talkApi.dart';
import 'getParticipantsResponse.dart';
class GetParticipants extends TalkApi<GetParticipantsResponse> {
String token;
GetParticipants(this.token) : super("v4/room/$token/participants", null);
@override
GetParticipantsResponse assemble(String raw) {
return GetParticipantsResponse.fromJson(jsonDecode(raw)['ocs']);
}
@override
Future<http.Response> request(Uri uri, Object? body, Map<String, String>? headers) {
return http.get(uri, headers: headers);
}
}