deleteComment method

  1. @override
Future<DeleteComment> deleteComment({
  1. required String token,
  2. required String distinctId,
  3. required String targetId,
  4. required String commentId,
})
override

Implementation

@override
Future<DeleteComment> deleteComment({
  required String token,
  required String distinctId,
  required String targetId,
  required String commentId,
}) async {
  final response = await dio.post(
    '/microsite/comments/delete',
    options: Options(headers: {'Authorization': 'Bearer $token'}),
    data: {
      'api_key': Environment.apiKey,
      'campaign': Environment.campaign,
      'distinct_id': distinctId,
      'target_id': targetId,
      'comment_id': commentId,
    },
  );
  final responseData = _parseResponse(response.data);
  return CommentMapper.deleteCommentToEntity(DeleteCommentResponse.fromJson(responseData));
}