mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
Code is now organized by api version. So formatting has moved to the api.v1 module. Instead of holding a separate ResultFormatter object per result format, simply move the functions to the formater collector and hand in the requested format as a parameter. Thus reorganized, the api.v1 module can export three simple functions for result formatting which in turn makes the code that uses the formatters much simpler.
16 lines
461 B
Python
16 lines
461 B
Python
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
# This file is part of Nominatim. (https://nominatim.org)
|
|
#
|
|
# Copyright (C) 2023 by the Nominatim developer community.
|
|
# For a full list of authors see the git log.
|
|
"""
|
|
Implementation of API version v1 (aka the legacy version).
|
|
"""
|
|
|
|
import nominatim.api.v1.format as _format
|
|
|
|
list_formats = _format.dispatch.list_formats
|
|
supports_format = _format.dispatch.supports_format
|
|
format_result = _format.dispatch.format_result
|