count method
Implementation
@override
Future<int> count({required CountBody body, String? authorization}) async {
final response = await _client.request(
method: 'GET',
path: '/db/count',
headers: {'authorization': authorization},
query: {'body': body},
);
final _body = await response.transform(utf8.decoder).join();
if (jsonDecode(_body) case {'data': final int data}) {
return data;
}
throw Exception('Invalid response');
}