stadiamaps 3.0.0__py3-none-any.whl → 3.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- stadiamaps/__init__.py +8 -2
- stadiamaps/api/geocoding_api.py +389 -106
- stadiamaps/api/geospatial_api.py +15 -13
- stadiamaps/api/routing_api.py +57 -50
- stadiamaps/api_client.py +54 -33
- stadiamaps/configuration.py +19 -5
- stadiamaps/exceptions.py +1 -1
- stadiamaps/models/__init__.py +7 -1
- stadiamaps/models/access.py +1 -1
- stadiamaps/models/admin_region.py +1 -1
- stadiamaps/models/administrative.py +1 -1
- stadiamaps/models/auto_costing_options.py +1 -1
- stadiamaps/models/base_costing_options.py +1 -1
- stadiamaps/models/base_trace_request.py +5 -5
- stadiamaps/models/bicycle_costing_options.py +1 -1
- stadiamaps/models/bike_network.py +1 -1
- stadiamaps/models/bulk_request.py +141 -0
- stadiamaps/models/bulk_search_request_inner.py +141 -0
- stadiamaps/models/bulk_search_response.py +109 -0
- stadiamaps/models/contour.py +1 -1
- stadiamaps/models/coordinate.py +1 -1
- stadiamaps/models/costing_model.py +1 -1
- stadiamaps/models/costing_options.py +1 -1
- stadiamaps/models/directions_options.py +5 -5
- stadiamaps/models/distance_unit.py +1 -1
- stadiamaps/models/edge_sign.py +1 -1
- stadiamaps/models/edge_use.py +1 -1
- stadiamaps/models/end_node.py +1 -1
- stadiamaps/models/geo_attributes.py +1 -1
- stadiamaps/models/geo_json_geometry.py +3 -3
- stadiamaps/models/geo_json_geometry_base.py +1 -1
- stadiamaps/models/geo_json_line_string.py +1 -1
- stadiamaps/models/geo_json_point.py +1 -1
- stadiamaps/models/geo_json_polygon.py +1 -1
- stadiamaps/models/geocoding_object.py +1 -1
- stadiamaps/models/height_request.py +1 -1
- stadiamaps/models/height_response.py +1 -1
- stadiamaps/models/highway_classification.py +1 -1
- stadiamaps/models/intersecting_edge.py +1 -1
- stadiamaps/models/isochrone_costing_model.py +8 -1
- stadiamaps/models/isochrone_feature.py +1 -1
- stadiamaps/models/isochrone_properties.py +1 -1
- stadiamaps/models/isochrone_request.py +1 -1
- stadiamaps/models/isochrone_response.py +1 -1
- stadiamaps/models/locate_detailed_edge.py +1 -1
- stadiamaps/models/locate_edge.py +1 -1
- stadiamaps/models/locate_edge_info.py +1 -1
- stadiamaps/models/locate_node.py +1 -1
- stadiamaps/models/locate_object.py +1 -1
- stadiamaps/models/low_speed_vehicle_costing_options.py +1 -1
- stadiamaps/models/maneuver_sign.py +1 -1
- stadiamaps/models/maneuver_sign_element.py +1 -1
- stadiamaps/models/map_match_costing_model.py +8 -2
- stadiamaps/models/map_match_request.py +5 -5
- stadiamaps/models/map_match_route_response.py +1 -1
- stadiamaps/models/map_match_trace_options.py +1 -1
- stadiamaps/models/map_match_waypoint.py +1 -1
- stadiamaps/models/matched_point.py +1 -1
- stadiamaps/models/matrix_costing_model.py +1 -1
- stadiamaps/models/matrix_distance.py +1 -1
- stadiamaps/models/matrix_request.py +5 -5
- stadiamaps/models/matrix_response.py +4 -4
- stadiamaps/models/matrix_waypoint.py +1 -1
- stadiamaps/models/motor_scooter_costing_options.py +1 -1
- stadiamaps/models/motorcycle_costing_options.py +1 -1
- stadiamaps/models/nearest_roads_request.py +5 -5
- stadiamaps/models/node_id.py +1 -1
- stadiamaps/models/node_type.py +1 -1
- stadiamaps/models/optimized_route_request.py +5 -5
- stadiamaps/models/pedestrian_costing_options.py +1 -1
- stadiamaps/models/pelias_geo_json_feature.py +3 -5
- stadiamaps/models/pelias_geo_json_properties.py +2 -2
- stadiamaps/models/pelias_geo_json_properties_addendum.py +1 -1
- stadiamaps/models/pelias_geo_json_properties_addendum_osm.py +1 -1
- stadiamaps/models/pelias_layer.py +1 -1
- stadiamaps/models/pelias_response.py +1 -1
- stadiamaps/models/pelias_source.py +1 -1
- stadiamaps/models/restrictions.py +1 -1
- stadiamaps/models/road_class.py +1 -1
- stadiamaps/models/route_leg.py +9 -5
- stadiamaps/models/route_maneuver.py +1 -1
- stadiamaps/models/route_request.py +12 -8
- stadiamaps/models/route_response.py +1 -1
- stadiamaps/models/route_response_alternates_inner.py +1 -1
- stadiamaps/models/route_summary.py +1 -1
- stadiamaps/models/route_trip.py +3 -3
- stadiamaps/models/routing_response_waypoint.py +1 -1
- stadiamaps/models/routing_waypoint.py +1 -1
- stadiamaps/models/routing_waypoint_all_of_search_filter.py +1 -1
- stadiamaps/models/search_bulk_query.py +117 -0
- stadiamaps/models/search_bulk_request.py +141 -0
- stadiamaps/models/search_query.py +134 -0
- stadiamaps/models/search_structured_bulk_query.py +117 -0
- stadiamaps/models/search_structured_query.py +148 -0
- stadiamaps/models/simple_routing_waypoint.py +1 -1
- stadiamaps/models/speeds.py +1 -1
- stadiamaps/models/trace_attribute_filter_options.py +1 -1
- stadiamaps/models/trace_attribute_key.py +1 -1
- stadiamaps/models/trace_attributes_base_response.py +1 -1
- stadiamaps/models/trace_attributes_request.py +5 -5
- stadiamaps/models/trace_attributes_response.py +3 -3
- stadiamaps/models/trace_edge.py +1 -1
- stadiamaps/models/travel_mode.py +1 -1
- stadiamaps/models/traversability.py +1 -1
- stadiamaps/models/truck_costing_options.py +1 -1
- stadiamaps/models/tz_response.py +1 -1
- stadiamaps/models/valhalla_languages.py +1 -1
- stadiamaps/models/valhalla_long_units.py +1 -1
- stadiamaps/models/warning.py +1 -1
- stadiamaps/rest.py +3 -1
- {stadiamaps-3.0.0.dist-info → stadiamaps-3.2.0.dist-info}/METADATA +1 -1
- stadiamaps-3.2.0.dist-info/RECORD +138 -0
- {stadiamaps-3.0.0.dist-info → stadiamaps-3.2.0.dist-info}/WHEEL +1 -1
- stadiamaps-3.0.0.dist-info/RECORD +0 -130
- {stadiamaps-3.0.0.dist-info → stadiamaps-3.2.0.dist-info}/LICENSE.txt +0 -0
- {stadiamaps-3.0.0.dist-info → stadiamaps-3.2.0.dist-info}/top_level.txt +0 -0
stadiamaps/api/geocoding_api.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document: 6.
|
8
|
+
The version of the OpenAPI document: 6.6.2
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -20,6 +20,8 @@ from typing_extensions import Annotated
|
|
20
20
|
from pydantic import Field, StrictFloat, StrictInt, StrictStr
|
21
21
|
from typing import List, Optional, Union
|
22
22
|
from typing_extensions import Annotated
|
23
|
+
from stadiamaps.models.bulk_request import BulkRequest
|
24
|
+
from stadiamaps.models.bulk_search_response import BulkSearchResponse
|
23
25
|
from stadiamaps.models.pelias_layer import PeliasLayer
|
24
26
|
from stadiamaps.models.pelias_response import PeliasResponse
|
25
27
|
from stadiamaps.models.pelias_source import PeliasSource
|
@@ -46,14 +48,14 @@ class GeocodingApi:
|
|
46
48
|
def autocomplete(
|
47
49
|
self,
|
48
50
|
text: Annotated[StrictStr, Field(description="The place name (address, venue name, etc.) to search for.")],
|
49
|
-
focus_point_lat: Annotated[Optional[Union[
|
50
|
-
focus_point_lon: Annotated[Optional[Union[
|
51
|
-
boundary_rect_min_lat: Annotated[Optional[Union[
|
52
|
-
boundary_rect_max_lat: Annotated[Optional[Union[
|
53
|
-
boundary_rect_min_lon: Annotated[Optional[Union[
|
54
|
-
boundary_rect_max_lon: Annotated[Optional[Union[
|
55
|
-
boundary_circle_lat: Annotated[Optional[Union[
|
56
|
-
boundary_circle_lon: Annotated[Optional[Union[
|
51
|
+
focus_point_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lon`.")] = None,
|
52
|
+
focus_point_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lat`.")] = None,
|
53
|
+
boundary_rect_min_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="Defines the min latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
54
|
+
boundary_rect_max_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
55
|
+
boundary_rect_min_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
56
|
+
boundary_rect_max_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
57
|
+
boundary_circle_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None,
|
58
|
+
boundary_circle_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None,
|
57
59
|
boundary_circle_radius: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.")] = None,
|
58
60
|
boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.")] = None,
|
59
61
|
boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None,
|
@@ -174,14 +176,14 @@ class GeocodingApi:
|
|
174
176
|
def autocomplete_with_http_info(
|
175
177
|
self,
|
176
178
|
text: Annotated[StrictStr, Field(description="The place name (address, venue name, etc.) to search for.")],
|
177
|
-
focus_point_lat: Annotated[Optional[Union[
|
178
|
-
focus_point_lon: Annotated[Optional[Union[
|
179
|
-
boundary_rect_min_lat: Annotated[Optional[Union[
|
180
|
-
boundary_rect_max_lat: Annotated[Optional[Union[
|
181
|
-
boundary_rect_min_lon: Annotated[Optional[Union[
|
182
|
-
boundary_rect_max_lon: Annotated[Optional[Union[
|
183
|
-
boundary_circle_lat: Annotated[Optional[Union[
|
184
|
-
boundary_circle_lon: Annotated[Optional[Union[
|
179
|
+
focus_point_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lon`.")] = None,
|
180
|
+
focus_point_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lat`.")] = None,
|
181
|
+
boundary_rect_min_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="Defines the min latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
182
|
+
boundary_rect_max_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
183
|
+
boundary_rect_min_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
184
|
+
boundary_rect_max_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
185
|
+
boundary_circle_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None,
|
186
|
+
boundary_circle_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None,
|
185
187
|
boundary_circle_radius: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.")] = None,
|
186
188
|
boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.")] = None,
|
187
189
|
boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None,
|
@@ -302,14 +304,14 @@ class GeocodingApi:
|
|
302
304
|
def autocomplete_without_preload_content(
|
303
305
|
self,
|
304
306
|
text: Annotated[StrictStr, Field(description="The place name (address, venue name, etc.) to search for.")],
|
305
|
-
focus_point_lat: Annotated[Optional[Union[
|
306
|
-
focus_point_lon: Annotated[Optional[Union[
|
307
|
-
boundary_rect_min_lat: Annotated[Optional[Union[
|
308
|
-
boundary_rect_max_lat: Annotated[Optional[Union[
|
309
|
-
boundary_rect_min_lon: Annotated[Optional[Union[
|
310
|
-
boundary_rect_max_lon: Annotated[Optional[Union[
|
311
|
-
boundary_circle_lat: Annotated[Optional[Union[
|
312
|
-
boundary_circle_lon: Annotated[Optional[Union[
|
307
|
+
focus_point_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lon`.")] = None,
|
308
|
+
focus_point_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lat`.")] = None,
|
309
|
+
boundary_rect_min_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="Defines the min latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
310
|
+
boundary_rect_max_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
311
|
+
boundary_rect_min_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
312
|
+
boundary_rect_max_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
313
|
+
boundary_circle_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None,
|
314
|
+
boundary_circle_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None,
|
313
315
|
boundary_circle_radius: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.")] = None,
|
314
316
|
boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.")] = None,
|
315
317
|
boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None,
|
@@ -458,7 +460,7 @@ class GeocodingApi:
|
|
458
460
|
_query_params: List[Tuple[str, str]] = []
|
459
461
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
460
462
|
_form_params: List[Tuple[str, str]] = []
|
461
|
-
_files: Dict[str, str] = {}
|
463
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
462
464
|
_body_params: Optional[bytes] = None
|
463
465
|
|
464
466
|
# process the path parameters
|
@@ -533,11 +535,12 @@ class GeocodingApi:
|
|
533
535
|
|
534
536
|
|
535
537
|
# set the HTTP header `Accept`
|
536
|
-
|
537
|
-
[
|
538
|
-
|
539
|
-
|
540
|
-
|
538
|
+
if 'Accept' not in _header_params:
|
539
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
540
|
+
[
|
541
|
+
'application/json'
|
542
|
+
]
|
543
|
+
)
|
541
544
|
|
542
545
|
|
543
546
|
# authentication setting
|
@@ -566,7 +569,7 @@ class GeocodingApi:
|
|
566
569
|
@validate_call
|
567
570
|
def place(
|
568
571
|
self,
|
569
|
-
ids: Annotated[List[StrictStr], Field(
|
572
|
+
ids: Annotated[List[StrictStr], Field(description="A list of Pelias GIDs to search for.")],
|
570
573
|
lang: Annotated[Optional[StrictStr], Field(description="A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.")] = None,
|
571
574
|
_request_timeout: Union[
|
572
575
|
None,
|
@@ -638,7 +641,7 @@ class GeocodingApi:
|
|
638
641
|
@validate_call
|
639
642
|
def place_with_http_info(
|
640
643
|
self,
|
641
|
-
ids: Annotated[List[StrictStr], Field(
|
644
|
+
ids: Annotated[List[StrictStr], Field(description="A list of Pelias GIDs to search for.")],
|
642
645
|
lang: Annotated[Optional[StrictStr], Field(description="A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.")] = None,
|
643
646
|
_request_timeout: Union[
|
644
647
|
None,
|
@@ -710,7 +713,7 @@ class GeocodingApi:
|
|
710
713
|
@validate_call
|
711
714
|
def place_without_preload_content(
|
712
715
|
self,
|
713
|
-
ids: Annotated[List[StrictStr], Field(
|
716
|
+
ids: Annotated[List[StrictStr], Field(description="A list of Pelias GIDs to search for.")],
|
714
717
|
lang: Annotated[Optional[StrictStr], Field(description="A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.")] = None,
|
715
718
|
_request_timeout: Union[
|
716
719
|
None,
|
@@ -795,7 +798,7 @@ class GeocodingApi:
|
|
795
798
|
_query_params: List[Tuple[str, str]] = []
|
796
799
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
797
800
|
_form_params: List[Tuple[str, str]] = []
|
798
|
-
_files: Dict[str, str] = {}
|
801
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
799
802
|
_body_params: Optional[bytes] = None
|
800
803
|
|
801
804
|
# process the path parameters
|
@@ -814,11 +817,12 @@ class GeocodingApi:
|
|
814
817
|
|
815
818
|
|
816
819
|
# set the HTTP header `Accept`
|
817
|
-
|
818
|
-
[
|
819
|
-
|
820
|
-
|
821
|
-
|
820
|
+
if 'Accept' not in _header_params:
|
821
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
822
|
+
[
|
823
|
+
'application/json'
|
824
|
+
]
|
825
|
+
)
|
822
826
|
|
823
827
|
|
824
828
|
# authentication setting
|
@@ -1169,7 +1173,7 @@ class GeocodingApi:
|
|
1169
1173
|
_query_params: List[Tuple[str, str]] = []
|
1170
1174
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1171
1175
|
_form_params: List[Tuple[str, str]] = []
|
1172
|
-
_files: Dict[str, str] = {}
|
1176
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
1173
1177
|
_body_params: Optional[bytes] = None
|
1174
1178
|
|
1175
1179
|
# process the path parameters
|
@@ -1216,11 +1220,12 @@ class GeocodingApi:
|
|
1216
1220
|
|
1217
1221
|
|
1218
1222
|
# set the HTTP header `Accept`
|
1219
|
-
|
1220
|
-
[
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1223
|
+
if 'Accept' not in _header_params:
|
1224
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1225
|
+
[
|
1226
|
+
'application/json'
|
1227
|
+
]
|
1228
|
+
)
|
1224
1229
|
|
1225
1230
|
|
1226
1231
|
# authentication setting
|
@@ -1250,14 +1255,14 @@ class GeocodingApi:
|
|
1250
1255
|
def search(
|
1251
1256
|
self,
|
1252
1257
|
text: Annotated[StrictStr, Field(description="The place name (address, venue name, etc.) to search for.")],
|
1253
|
-
focus_point_lat: Annotated[Optional[Union[
|
1254
|
-
focus_point_lon: Annotated[Optional[Union[
|
1255
|
-
boundary_rect_min_lat: Annotated[Optional[Union[
|
1256
|
-
boundary_rect_max_lat: Annotated[Optional[Union[
|
1257
|
-
boundary_rect_min_lon: Annotated[Optional[Union[
|
1258
|
-
boundary_rect_max_lon: Annotated[Optional[Union[
|
1259
|
-
boundary_circle_lat: Annotated[Optional[Union[
|
1260
|
-
boundary_circle_lon: Annotated[Optional[Union[
|
1258
|
+
focus_point_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lon`.")] = None,
|
1259
|
+
focus_point_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lat`.")] = None,
|
1260
|
+
boundary_rect_min_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="Defines the min latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
1261
|
+
boundary_rect_max_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
1262
|
+
boundary_rect_min_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
1263
|
+
boundary_rect_max_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
1264
|
+
boundary_circle_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None,
|
1265
|
+
boundary_circle_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None,
|
1261
1266
|
boundary_circle_radius: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.")] = None,
|
1262
1267
|
boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.")] = None,
|
1263
1268
|
boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None,
|
@@ -1378,14 +1383,14 @@ class GeocodingApi:
|
|
1378
1383
|
def search_with_http_info(
|
1379
1384
|
self,
|
1380
1385
|
text: Annotated[StrictStr, Field(description="The place name (address, venue name, etc.) to search for.")],
|
1381
|
-
focus_point_lat: Annotated[Optional[Union[
|
1382
|
-
focus_point_lon: Annotated[Optional[Union[
|
1383
|
-
boundary_rect_min_lat: Annotated[Optional[Union[
|
1384
|
-
boundary_rect_max_lat: Annotated[Optional[Union[
|
1385
|
-
boundary_rect_min_lon: Annotated[Optional[Union[
|
1386
|
-
boundary_rect_max_lon: Annotated[Optional[Union[
|
1387
|
-
boundary_circle_lat: Annotated[Optional[Union[
|
1388
|
-
boundary_circle_lon: Annotated[Optional[Union[
|
1386
|
+
focus_point_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lon`.")] = None,
|
1387
|
+
focus_point_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lat`.")] = None,
|
1388
|
+
boundary_rect_min_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="Defines the min latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
1389
|
+
boundary_rect_max_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
1390
|
+
boundary_rect_min_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
1391
|
+
boundary_rect_max_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
1392
|
+
boundary_circle_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None,
|
1393
|
+
boundary_circle_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None,
|
1389
1394
|
boundary_circle_radius: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.")] = None,
|
1390
1395
|
boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.")] = None,
|
1391
1396
|
boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None,
|
@@ -1506,14 +1511,14 @@ class GeocodingApi:
|
|
1506
1511
|
def search_without_preload_content(
|
1507
1512
|
self,
|
1508
1513
|
text: Annotated[StrictStr, Field(description="The place name (address, venue name, etc.) to search for.")],
|
1509
|
-
focus_point_lat: Annotated[Optional[Union[
|
1510
|
-
focus_point_lon: Annotated[Optional[Union[
|
1511
|
-
boundary_rect_min_lat: Annotated[Optional[Union[
|
1512
|
-
boundary_rect_max_lat: Annotated[Optional[Union[
|
1513
|
-
boundary_rect_min_lon: Annotated[Optional[Union[
|
1514
|
-
boundary_rect_max_lon: Annotated[Optional[Union[
|
1515
|
-
boundary_circle_lat: Annotated[Optional[Union[
|
1516
|
-
boundary_circle_lon: Annotated[Optional[Union[
|
1514
|
+
focus_point_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lon`.")] = None,
|
1515
|
+
focus_point_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lat`.")] = None,
|
1516
|
+
boundary_rect_min_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="Defines the min latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
1517
|
+
boundary_rect_max_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
1518
|
+
boundary_rect_min_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
1519
|
+
boundary_rect_max_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
1520
|
+
boundary_circle_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None,
|
1521
|
+
boundary_circle_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None,
|
1517
1522
|
boundary_circle_radius: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.")] = None,
|
1518
1523
|
boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.")] = None,
|
1519
1524
|
boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None,
|
@@ -1662,7 +1667,7 @@ class GeocodingApi:
|
|
1662
1667
|
_query_params: List[Tuple[str, str]] = []
|
1663
1668
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1664
1669
|
_form_params: List[Tuple[str, str]] = []
|
1665
|
-
_files: Dict[str, str] = {}
|
1670
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
1666
1671
|
_body_params: Optional[bytes] = None
|
1667
1672
|
|
1668
1673
|
# process the path parameters
|
@@ -1737,11 +1742,12 @@ class GeocodingApi:
|
|
1737
1742
|
|
1738
1743
|
|
1739
1744
|
# set the HTTP header `Accept`
|
1740
|
-
|
1741
|
-
[
|
1742
|
-
|
1743
|
-
|
1744
|
-
|
1745
|
+
if 'Accept' not in _header_params:
|
1746
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1747
|
+
[
|
1748
|
+
'application/json'
|
1749
|
+
]
|
1750
|
+
)
|
1745
1751
|
|
1746
1752
|
|
1747
1753
|
# authentication setting
|
@@ -1767,6 +1773,282 @@ class GeocodingApi:
|
|
1767
1773
|
|
1768
1774
|
|
1769
1775
|
|
1776
|
+
@validate_call
|
1777
|
+
def search_bulk(
|
1778
|
+
self,
|
1779
|
+
bulk_request: Optional[List[BulkRequest]] = None,
|
1780
|
+
_request_timeout: Union[
|
1781
|
+
None,
|
1782
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1783
|
+
Tuple[
|
1784
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1785
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1786
|
+
]
|
1787
|
+
] = None,
|
1788
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1789
|
+
_content_type: Optional[StrictStr] = None,
|
1790
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1791
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1792
|
+
) -> List[BulkSearchResponse]:
|
1793
|
+
"""Quickly run a batch of geocoding queries against the search or structured search endpoints.
|
1794
|
+
|
1795
|
+
The batch endpoint lets you specify many search or structured search requests at once. Once received, all requests will be processed internally on our infrastructure, improving throughput when you need to do a lot of queries.
|
1796
|
+
|
1797
|
+
:param bulk_request:
|
1798
|
+
:type bulk_request: List[BulkRequest]
|
1799
|
+
:param _request_timeout: timeout setting for this request. If one
|
1800
|
+
number provided, it will be total request
|
1801
|
+
timeout. It can also be a pair (tuple) of
|
1802
|
+
(connection, read) timeouts.
|
1803
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1804
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1805
|
+
request; this effectively ignores the
|
1806
|
+
authentication in the spec for a single request.
|
1807
|
+
:type _request_auth: dict, optional
|
1808
|
+
:param _content_type: force content-type for the request.
|
1809
|
+
:type _content_type: str, Optional
|
1810
|
+
:param _headers: set to override the headers for a single
|
1811
|
+
request; this effectively ignores the headers
|
1812
|
+
in the spec for a single request.
|
1813
|
+
:type _headers: dict, optional
|
1814
|
+
:param _host_index: set to override the host_index for a single
|
1815
|
+
request; this effectively ignores the host_index
|
1816
|
+
in the spec for a single request.
|
1817
|
+
:type _host_index: int, optional
|
1818
|
+
:return: Returns the result object.
|
1819
|
+
""" # noqa: E501
|
1820
|
+
|
1821
|
+
_param = self._search_bulk_serialize(
|
1822
|
+
bulk_request=bulk_request,
|
1823
|
+
_request_auth=_request_auth,
|
1824
|
+
_content_type=_content_type,
|
1825
|
+
_headers=_headers,
|
1826
|
+
_host_index=_host_index
|
1827
|
+
)
|
1828
|
+
|
1829
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1830
|
+
'200': "List[BulkSearchResponse]",
|
1831
|
+
'400': None,
|
1832
|
+
}
|
1833
|
+
response_data = self.api_client.call_api(
|
1834
|
+
*_param,
|
1835
|
+
_request_timeout=_request_timeout
|
1836
|
+
)
|
1837
|
+
response_data.read()
|
1838
|
+
return self.api_client.response_deserialize(
|
1839
|
+
response_data=response_data,
|
1840
|
+
response_types_map=_response_types_map,
|
1841
|
+
).data
|
1842
|
+
|
1843
|
+
|
1844
|
+
@validate_call
|
1845
|
+
def search_bulk_with_http_info(
|
1846
|
+
self,
|
1847
|
+
bulk_request: Optional[List[BulkRequest]] = None,
|
1848
|
+
_request_timeout: Union[
|
1849
|
+
None,
|
1850
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1851
|
+
Tuple[
|
1852
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1853
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1854
|
+
]
|
1855
|
+
] = None,
|
1856
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1857
|
+
_content_type: Optional[StrictStr] = None,
|
1858
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1859
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1860
|
+
) -> ApiResponse[List[BulkSearchResponse]]:
|
1861
|
+
"""Quickly run a batch of geocoding queries against the search or structured search endpoints.
|
1862
|
+
|
1863
|
+
The batch endpoint lets you specify many search or structured search requests at once. Once received, all requests will be processed internally on our infrastructure, improving throughput when you need to do a lot of queries.
|
1864
|
+
|
1865
|
+
:param bulk_request:
|
1866
|
+
:type bulk_request: List[BulkRequest]
|
1867
|
+
:param _request_timeout: timeout setting for this request. If one
|
1868
|
+
number provided, it will be total request
|
1869
|
+
timeout. It can also be a pair (tuple) of
|
1870
|
+
(connection, read) timeouts.
|
1871
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1872
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1873
|
+
request; this effectively ignores the
|
1874
|
+
authentication in the spec for a single request.
|
1875
|
+
:type _request_auth: dict, optional
|
1876
|
+
:param _content_type: force content-type for the request.
|
1877
|
+
:type _content_type: str, Optional
|
1878
|
+
:param _headers: set to override the headers for a single
|
1879
|
+
request; this effectively ignores the headers
|
1880
|
+
in the spec for a single request.
|
1881
|
+
:type _headers: dict, optional
|
1882
|
+
:param _host_index: set to override the host_index for a single
|
1883
|
+
request; this effectively ignores the host_index
|
1884
|
+
in the spec for a single request.
|
1885
|
+
:type _host_index: int, optional
|
1886
|
+
:return: Returns the result object.
|
1887
|
+
""" # noqa: E501
|
1888
|
+
|
1889
|
+
_param = self._search_bulk_serialize(
|
1890
|
+
bulk_request=bulk_request,
|
1891
|
+
_request_auth=_request_auth,
|
1892
|
+
_content_type=_content_type,
|
1893
|
+
_headers=_headers,
|
1894
|
+
_host_index=_host_index
|
1895
|
+
)
|
1896
|
+
|
1897
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1898
|
+
'200': "List[BulkSearchResponse]",
|
1899
|
+
'400': None,
|
1900
|
+
}
|
1901
|
+
response_data = self.api_client.call_api(
|
1902
|
+
*_param,
|
1903
|
+
_request_timeout=_request_timeout
|
1904
|
+
)
|
1905
|
+
response_data.read()
|
1906
|
+
return self.api_client.response_deserialize(
|
1907
|
+
response_data=response_data,
|
1908
|
+
response_types_map=_response_types_map,
|
1909
|
+
)
|
1910
|
+
|
1911
|
+
|
1912
|
+
@validate_call
|
1913
|
+
def search_bulk_without_preload_content(
|
1914
|
+
self,
|
1915
|
+
bulk_request: Optional[List[BulkRequest]] = None,
|
1916
|
+
_request_timeout: Union[
|
1917
|
+
None,
|
1918
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1919
|
+
Tuple[
|
1920
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1921
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1922
|
+
]
|
1923
|
+
] = None,
|
1924
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1925
|
+
_content_type: Optional[StrictStr] = None,
|
1926
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1927
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1928
|
+
) -> RESTResponseType:
|
1929
|
+
"""Quickly run a batch of geocoding queries against the search or structured search endpoints.
|
1930
|
+
|
1931
|
+
The batch endpoint lets you specify many search or structured search requests at once. Once received, all requests will be processed internally on our infrastructure, improving throughput when you need to do a lot of queries.
|
1932
|
+
|
1933
|
+
:param bulk_request:
|
1934
|
+
:type bulk_request: List[BulkRequest]
|
1935
|
+
:param _request_timeout: timeout setting for this request. If one
|
1936
|
+
number provided, it will be total request
|
1937
|
+
timeout. It can also be a pair (tuple) of
|
1938
|
+
(connection, read) timeouts.
|
1939
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1940
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1941
|
+
request; this effectively ignores the
|
1942
|
+
authentication in the spec for a single request.
|
1943
|
+
:type _request_auth: dict, optional
|
1944
|
+
:param _content_type: force content-type for the request.
|
1945
|
+
:type _content_type: str, Optional
|
1946
|
+
:param _headers: set to override the headers for a single
|
1947
|
+
request; this effectively ignores the headers
|
1948
|
+
in the spec for a single request.
|
1949
|
+
:type _headers: dict, optional
|
1950
|
+
:param _host_index: set to override the host_index for a single
|
1951
|
+
request; this effectively ignores the host_index
|
1952
|
+
in the spec for a single request.
|
1953
|
+
:type _host_index: int, optional
|
1954
|
+
:return: Returns the result object.
|
1955
|
+
""" # noqa: E501
|
1956
|
+
|
1957
|
+
_param = self._search_bulk_serialize(
|
1958
|
+
bulk_request=bulk_request,
|
1959
|
+
_request_auth=_request_auth,
|
1960
|
+
_content_type=_content_type,
|
1961
|
+
_headers=_headers,
|
1962
|
+
_host_index=_host_index
|
1963
|
+
)
|
1964
|
+
|
1965
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1966
|
+
'200': "List[BulkSearchResponse]",
|
1967
|
+
'400': None,
|
1968
|
+
}
|
1969
|
+
response_data = self.api_client.call_api(
|
1970
|
+
*_param,
|
1971
|
+
_request_timeout=_request_timeout
|
1972
|
+
)
|
1973
|
+
return response_data.response
|
1974
|
+
|
1975
|
+
|
1976
|
+
def _search_bulk_serialize(
|
1977
|
+
self,
|
1978
|
+
bulk_request,
|
1979
|
+
_request_auth,
|
1980
|
+
_content_type,
|
1981
|
+
_headers,
|
1982
|
+
_host_index,
|
1983
|
+
) -> RequestSerialized:
|
1984
|
+
|
1985
|
+
_host = None
|
1986
|
+
|
1987
|
+
_collection_formats: Dict[str, str] = {
|
1988
|
+
'BulkRequest': '',
|
1989
|
+
}
|
1990
|
+
|
1991
|
+
_path_params: Dict[str, str] = {}
|
1992
|
+
_query_params: List[Tuple[str, str]] = []
|
1993
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1994
|
+
_form_params: List[Tuple[str, str]] = []
|
1995
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
1996
|
+
_body_params: Optional[bytes] = None
|
1997
|
+
|
1998
|
+
# process the path parameters
|
1999
|
+
# process the query parameters
|
2000
|
+
# process the header parameters
|
2001
|
+
# process the form parameters
|
2002
|
+
# process the body parameter
|
2003
|
+
if bulk_request is not None:
|
2004
|
+
_body_params = bulk_request
|
2005
|
+
|
2006
|
+
|
2007
|
+
# set the HTTP header `Accept`
|
2008
|
+
if 'Accept' not in _header_params:
|
2009
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
2010
|
+
[
|
2011
|
+
'application/json'
|
2012
|
+
]
|
2013
|
+
)
|
2014
|
+
|
2015
|
+
# set the HTTP header `Content-Type`
|
2016
|
+
if _content_type:
|
2017
|
+
_header_params['Content-Type'] = _content_type
|
2018
|
+
else:
|
2019
|
+
_default_content_type = (
|
2020
|
+
self.api_client.select_header_content_type(
|
2021
|
+
[
|
2022
|
+
'application/json'
|
2023
|
+
]
|
2024
|
+
)
|
2025
|
+
)
|
2026
|
+
if _default_content_type is not None:
|
2027
|
+
_header_params['Content-Type'] = _default_content_type
|
2028
|
+
|
2029
|
+
# authentication setting
|
2030
|
+
_auth_settings: List[str] = [
|
2031
|
+
'ApiKeyAuth'
|
2032
|
+
]
|
2033
|
+
|
2034
|
+
return self.api_client.param_serialize(
|
2035
|
+
method='POST',
|
2036
|
+
resource_path='/geocoding/v1/search/bulk',
|
2037
|
+
path_params=_path_params,
|
2038
|
+
query_params=_query_params,
|
2039
|
+
header_params=_header_params,
|
2040
|
+
body=_body_params,
|
2041
|
+
post_params=_form_params,
|
2042
|
+
files=_files,
|
2043
|
+
auth_settings=_auth_settings,
|
2044
|
+
collection_formats=_collection_formats,
|
2045
|
+
_host=_host,
|
2046
|
+
_request_auth=_request_auth
|
2047
|
+
)
|
2048
|
+
|
2049
|
+
|
2050
|
+
|
2051
|
+
|
1770
2052
|
@validate_call
|
1771
2053
|
def search_structured(
|
1772
2054
|
self,
|
@@ -1778,14 +2060,14 @@ class GeocodingApi:
|
|
1778
2060
|
region: Annotated[Optional[StrictStr], Field(description="Typically the first administrative division within a country. For example, a US state or a Canadian province.")] = None,
|
1779
2061
|
postalcode: Annotated[Optional[StrictStr], Field(description="A mail sorting code.")] = None,
|
1780
2062
|
country: Annotated[Optional[StrictStr], Field(description="A full name (ex: Canada), or a 2 or 3 character ISO code. Prefer ISO codes when possible.")] = None,
|
1781
|
-
focus_point_lat: Annotated[Optional[Union[
|
1782
|
-
focus_point_lon: Annotated[Optional[Union[
|
1783
|
-
boundary_rect_min_lat: Annotated[Optional[Union[
|
1784
|
-
boundary_rect_max_lat: Annotated[Optional[Union[
|
1785
|
-
boundary_rect_min_lon: Annotated[Optional[Union[
|
1786
|
-
boundary_rect_max_lon: Annotated[Optional[Union[
|
1787
|
-
boundary_circle_lat: Annotated[Optional[Union[
|
1788
|
-
boundary_circle_lon: Annotated[Optional[Union[
|
2063
|
+
focus_point_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lon`.")] = None,
|
2064
|
+
focus_point_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lat`.")] = None,
|
2065
|
+
boundary_rect_min_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="Defines the min latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
2066
|
+
boundary_rect_max_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
2067
|
+
boundary_rect_min_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
2068
|
+
boundary_rect_max_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
2069
|
+
boundary_circle_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None,
|
2070
|
+
boundary_circle_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None,
|
1789
2071
|
boundary_circle_radius: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.")] = None,
|
1790
2072
|
boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.")] = None,
|
1791
2073
|
boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None,
|
@@ -1934,14 +2216,14 @@ class GeocodingApi:
|
|
1934
2216
|
region: Annotated[Optional[StrictStr], Field(description="Typically the first administrative division within a country. For example, a US state or a Canadian province.")] = None,
|
1935
2217
|
postalcode: Annotated[Optional[StrictStr], Field(description="A mail sorting code.")] = None,
|
1936
2218
|
country: Annotated[Optional[StrictStr], Field(description="A full name (ex: Canada), or a 2 or 3 character ISO code. Prefer ISO codes when possible.")] = None,
|
1937
|
-
focus_point_lat: Annotated[Optional[Union[
|
1938
|
-
focus_point_lon: Annotated[Optional[Union[
|
1939
|
-
boundary_rect_min_lat: Annotated[Optional[Union[
|
1940
|
-
boundary_rect_max_lat: Annotated[Optional[Union[
|
1941
|
-
boundary_rect_min_lon: Annotated[Optional[Union[
|
1942
|
-
boundary_rect_max_lon: Annotated[Optional[Union[
|
1943
|
-
boundary_circle_lat: Annotated[Optional[Union[
|
1944
|
-
boundary_circle_lon: Annotated[Optional[Union[
|
2219
|
+
focus_point_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lon`.")] = None,
|
2220
|
+
focus_point_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lat`.")] = None,
|
2221
|
+
boundary_rect_min_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="Defines the min latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
2222
|
+
boundary_rect_max_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
2223
|
+
boundary_rect_min_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
2224
|
+
boundary_rect_max_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
2225
|
+
boundary_circle_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None,
|
2226
|
+
boundary_circle_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None,
|
1945
2227
|
boundary_circle_radius: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.")] = None,
|
1946
2228
|
boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.")] = None,
|
1947
2229
|
boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None,
|
@@ -2090,14 +2372,14 @@ class GeocodingApi:
|
|
2090
2372
|
region: Annotated[Optional[StrictStr], Field(description="Typically the first administrative division within a country. For example, a US state or a Canadian province.")] = None,
|
2091
2373
|
postalcode: Annotated[Optional[StrictStr], Field(description="A mail sorting code.")] = None,
|
2092
2374
|
country: Annotated[Optional[StrictStr], Field(description="A full name (ex: Canada), or a 2 or 3 character ISO code. Prefer ISO codes when possible.")] = None,
|
2093
|
-
focus_point_lat: Annotated[Optional[Union[
|
2094
|
-
focus_point_lon: Annotated[Optional[Union[
|
2095
|
-
boundary_rect_min_lat: Annotated[Optional[Union[
|
2096
|
-
boundary_rect_max_lat: Annotated[Optional[Union[
|
2097
|
-
boundary_rect_min_lon: Annotated[Optional[Union[
|
2098
|
-
boundary_rect_max_lon: Annotated[Optional[Union[
|
2099
|
-
boundary_circle_lat: Annotated[Optional[Union[
|
2100
|
-
boundary_circle_lon: Annotated[Optional[Union[
|
2375
|
+
focus_point_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lon`.")] = None,
|
2376
|
+
focus_point_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lat`.")] = None,
|
2377
|
+
boundary_rect_min_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="Defines the min latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
2378
|
+
boundary_rect_max_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
2379
|
+
boundary_rect_min_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
2380
|
+
boundary_rect_max_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
|
2381
|
+
boundary_circle_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None,
|
2382
|
+
boundary_circle_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None,
|
2101
2383
|
boundary_circle_radius: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.")] = None,
|
2102
2384
|
boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.")] = None,
|
2103
2385
|
boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None,
|
@@ -2274,7 +2556,7 @@ class GeocodingApi:
|
|
2274
2556
|
_query_params: List[Tuple[str, str]] = []
|
2275
2557
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
2276
2558
|
_form_params: List[Tuple[str, str]] = []
|
2277
|
-
_files: Dict[str, str] = {}
|
2559
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
2278
2560
|
_body_params: Optional[bytes] = None
|
2279
2561
|
|
2280
2562
|
# process the path parameters
|
@@ -2377,11 +2659,12 @@ class GeocodingApi:
|
|
2377
2659
|
|
2378
2660
|
|
2379
2661
|
# set the HTTP header `Accept`
|
2380
|
-
|
2381
|
-
[
|
2382
|
-
|
2383
|
-
|
2384
|
-
|
2662
|
+
if 'Accept' not in _header_params:
|
2663
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
2664
|
+
[
|
2665
|
+
'application/json'
|
2666
|
+
]
|
2667
|
+
)
|
2385
2668
|
|
2386
2669
|
|
2387
2670
|
# authentication setting
|