getAllMapsMapsGetWithHttpInfo method

Future<Response> getAllMapsMapsGetWithHttpInfo({
  1. MapLayer? layer,
  2. MapContentType? contentType,
  3. String? contentCode,
  4. bool? hideBlockedMaps,
  5. int? page,
  6. int? size,
})

Get All Maps

Fetch maps details.

Note: This method returns the HTTP Response.

Parameters:

  • MapLayer layer: Filter maps by layer.

  • MapContentType contentType: Type of maps.

  • String contentCode: Content code on the map.

  • bool hideBlockedMaps: When true, excludes maps with access_type 'blocked' from the results.

  • int page: Page number

  • int size: Page size

Implementation

Future<Response> getAllMapsMapsGetWithHttpInfo({
  MapLayer? layer,
  MapContentType? contentType,
  String? contentCode,
  bool? hideBlockedMaps,
  int? page,
  int? size,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/maps';

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (layer != null) {
    queryParams.addAll(_queryParams('', 'layer', layer));
  }
  if (contentType != null) {
    queryParams.addAll(_queryParams('', 'content_type', contentType));
  }
  if (contentCode != null) {
    queryParams.addAll(_queryParams('', 'content_code', contentCode));
  }
  if (hideBlockedMaps != null) {
    queryParams
        .addAll(_queryParams('', 'hide_blocked_maps', hideBlockedMaps));
  }
  if (page != null) {
    queryParams.addAll(_queryParams('', 'page', page));
  }
  if (size != null) {
    queryParams.addAll(_queryParams('', 'size', size));
  }

  const contentTypes = <String>[];

  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}