vehicles method
Future<Map<LicensePlate, Vehicle> >
vehicles(
- Iterable<
LicensePlate> plates, { - Set<
RdwData> include = const {},
Looks up the vehicles with plates, a hundred plates per request.
Plates RDW does not know are left out of the result. Throws an RdwException if a lookup fails.
Implementation
Future<Map<LicensePlate, Vehicle>> vehicles(
Iterable<LicensePlate> plates, {
Set<RdwData> include = const {},
}) async {
final vehicles = <LicensePlate, Vehicle>{};
for (final batch in _batches(plates.toSet().toList())) {
vehicles.addAll(await _fetchBatch(batch, include));
}
return vehicles;
}