import 'dart:convert';

import 'package:http/http.dart' as http;

import '../talkApi.dart';
import 'getRoomParams.dart';
import 'getRoomResponse.dart';


class GetRoom extends TalkApi<GetRoomResponse> {
  GetRoomParams params;
  GetRoom(this.params) : super("v4/room", null, getParameters: params.toJson());



  @override
  GetRoomResponse assemble(String raw) {
    return GetRoomResponse.fromJson(jsonDecode(raw)['ocs']);
  }

  @override
  Future<http.Response> request(Uri uri, Object? body, Map<String, String>? headers) {
    return http.get(uri, headers: headers);
  }

}