getAll static method
Future<TestRuns>
getAll(
{ - required int projectId,
- DateTime? createdAfter,
- DateTime? createdBefore,
- Iterable<int>? createdBy,
- bool? isCompleted,
- int? limit,
- int? offset,
- Iterable<int>? milestoneId,
- String? refsFilter,
- Iterable<int>? suiteId,
})
Implementation
static Future<TestRuns> getAll({
required int projectId,
DateTime? createdAfter,
DateTime? createdBefore,
Iterable<int>? createdBy,
bool? isCompleted,
int? limit,
int? offset,
Iterable<int>? milestoneId,
String? refsFilter,
Iterable<int>? suiteId,
}) async {
final queryParameters = <String, dynamic>{
'created_after': createdAfter?.millisecondsSinceEpoch,
'created_before': createdBefore?.millisecondsSinceEpoch,
'created_by': createdBy?.join(','),
'is_completed': isCompleted,
'limit': limit,
'offset': offset,
'milestone_id': milestoneId?.join(','),
'refs_filter': refsFilter,
'suite_id': suiteId?.join(','),
};
queryParameters.removeWhere((_, dynamic value) => value == null);
final response = await FlutterTestRail.instance.client.request(
'/get_runs/$projectId',
RequestMethod.get,
queryParameters: queryParameters,
);
return TestRuns.fromJson(response!);
}