getAll static method
Future<TestCases>
getAll(
- int projectId, {
- DateTime? createdAfter,
- DateTime? createdBefore,
- Iterable<
int> ? createdBy, - String? filter,
- int? limit,
- int? offset,
- Iterable<
int> ? milestoneId, - Iterable<
int> ? priorityId, - String? refs,
- int? sectionId,
- Iterable<
int> ? templateId, - Iterable<
int> ? typeId, - DateTime? updatedAfter,
- DateTime? updatedBefore,
- Iterable<
int> ? updatedBy,
Implementation
static Future<TestCases> getAll(
int projectId, {
DateTime? createdAfter,
DateTime? createdBefore,
Iterable<int>? createdBy,
String? filter,
int? limit,
int? offset,
Iterable<int>? milestoneId,
Iterable<int>? priorityId,
String? refs,
int? sectionId,
Iterable<int>? templateId,
Iterable<int>? typeId,
DateTime? updatedAfter,
DateTime? updatedBefore,
Iterable<int>? updatedBy,
}) async {
final queryParameters = <String, dynamic>{
'created_after': createdAfter?.millisecondsSinceEpoch,
'created_before': createdBefore?.millisecondsSinceEpoch,
'created_by': createdBy?.join(','),
'filter': filter,
'limit': limit,
'offset': offset,
'milestone_id': milestoneId?.join(','),
'priority_id': priorityId?.join(','),
'refs_filter': refs,
'section_id': sectionId,
'template_id': templateId?.join(','),
'type_id': typeId?.join(','),
'updated_after': updatedAfter?.millisecondsSinceEpoch,
'updated_before': updatedBefore?.millisecondsSinceEpoch,
'updated_by': updatedBy?.join(','),
};
queryParameters.removeWhere((_, dynamic value) => value == null);
final response = await FlutterTestRail.instance.client.request(
'/get_cases/$projectId',
RequestMethod.get,
queryParameters: queryParameters,
);
return TestCases.fromJson(response!);
}