getByPathIdQueryPlaceTypes method

Future<List<Place>> getByPathIdQueryPlaceTypes(
  1. String id,
  2. List<String> placeTypes
)

Get a list of places corresponding to a given id and place types.

Implementation

Future<List<Place>> getByPathIdQueryPlaceTypes(
  String id,
  List<String> placeTypes,
) async {
  final response = await _context.client.get(
    Uri.https(
      authority,
      '/stoppoint/$id/placetypes',
      {
        'placeTypes': placeTypes.join(','),
      },
    ),
  );

  ClientException.checkIsSuccessStatusCode(response);

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