getBugs method

Future<ResponseBug> getBugs(
  1. String reportingTokenCall,
  2. String appId, {
  3. int page = 0,
  4. int size = 10,
})

Implementation

Future<ResponseBug> getBugs(String reportingTokenCall,String appId,
    {int page = 0, int size = 10}) async {
  try {
    final response = await _dio.get(
            '${QuashConstants.baseUrl}${QuashConstants.getReportsEndPoint}$appId&page=$page&size=$size',
        options: Options(
          contentType: 'application/json; charset=UTF-8',
          headers: {
            'Authorization': 'Bearer $reportingTokenCall',
          },
        ),
    );
    return ResponseBug.fromJson(response.data);
  } on Exception catch (e) {
    if (kDebugMode) {
      print("An Exception occurred while getting bugs: $e");
    }
    rethrow;
  }
}