getByPathIdQueryIncludeChildren method

Future<Place> getByPathIdQueryIncludeChildren(
  1. String id, [
  2. bool? includeChildren
])

Gets the place with the given id.

Implementation

Future<Place> getByPathIdQueryIncludeChildren(
  String id, [
  bool? includeChildren,
]) async {
  final response = await _context.client.get(
    Uri.https(
      authority,
      '/place/$id',
      {
        if (includeChildren != null)
          'includeChildren': includeChildren.toString(),
      },
    ),
  );

  ClientException.checkIsSuccessStatusCode(response);

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