routeByPathIdQueryServiceTypes method

Future<List<StopPointRouteSection>> routeByPathIdQueryServiceTypes(
  1. String id, [
  2. List<String>? serviceTypes
])

Returns the route sections for all the lines that service the given stop point ids

Implementation

Future<List<StopPointRouteSection>> routeByPathIdQueryServiceTypes(
  String id, [
  List<String>? serviceTypes,
]) async {
  final response = await _context.client.get(
    Uri.https(
      authority,
      '/stoppoint/$id/route',
      {
        if (serviceTypes != null) 'serviceTypes': serviceTypes.join(','),
      },
    ),
  );

  ClientException.checkIsSuccessStatusCode(response);

  return StopPointRouteSection.listFromJson(json.decode(response.body));
}