Skip to content

Commit

Permalink
Version 4.0 - support for navigation aids
Browse files Browse the repository at this point in the history
  • Loading branch information
ianthetechie committed Sep 4, 2024
1 parent 17d149c commit b1e00ef
Show file tree
Hide file tree
Showing 181 changed files with 5,948 additions and 258 deletions.
43 changes: 42 additions & 1 deletion .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
docs/Access.md
docs/AdminRegion.md
docs/Administrative.md
docs/AnnotationFilters.md
docs/AutoCostingOptions.md
docs/BaseCostingOptions.md
docs/BaseTraceRequest.md
Expand All @@ -21,6 +22,7 @@ docs/DistanceUnit.md
docs/EdgeSign.md
docs/EdgeUse.md
docs/EndNode.md
docs/ExtendedDirectionsOptions.md
docs/GeoAttributes.md
docs/GeoJSONGeometry.md
docs/GeoJSONGeometryBase.md
Expand Down Expand Up @@ -64,6 +66,24 @@ docs/NearestRoadsRequest.md
docs/NodeId.md
docs/NodeType.md
docs/OptimizedRouteRequest.md
docs/OsrmAdmin.md
docs/OsrmAnnotation.md
docs/OsrmBannerComponent.md
docs/OsrmBannerContent.md
docs/OsrmBannerInstruction.md
docs/OsrmBaseApiResponse.md
docs/OsrmGuidanceModifier.md
docs/OsrmIntersection.md
docs/OsrmLane.md
docs/OsrmRoute.md
docs/OsrmRouteLeg.md
docs/OsrmRouteResponse.md
docs/OsrmRouteStep.md
docs/OsrmSpeedLimit.md
docs/OsrmStepManeuver.md
docs/OsrmViaWaypoint.md
docs/OsrmVoiceInstruction.md
docs/OsrmWaypoint.md
docs/PedestrianCostingOptions.md
docs/PeliasGeoJSONFeature.md
docs/PeliasGeoJSONProperties.md
Expand All @@ -74,6 +94,7 @@ docs/PeliasResponse.md
docs/PeliasSource.md
docs/Restrictions.md
docs/RoadClass.md
docs/Route200Response.md
docs/RouteLeg.md
docs/RouteManeuver.md
docs/RouteRequest.md
Expand Down Expand Up @@ -120,6 +141,7 @@ stadiamaps/models/__init__.py
stadiamaps/models/access.py
stadiamaps/models/admin_region.py
stadiamaps/models/administrative.py
stadiamaps/models/annotation_filters.py
stadiamaps/models/auto_costing_options.py
stadiamaps/models/base_costing_options.py
stadiamaps/models/base_trace_request.py
Expand All @@ -137,6 +159,7 @@ stadiamaps/models/distance_unit.py
stadiamaps/models/edge_sign.py
stadiamaps/models/edge_use.py
stadiamaps/models/end_node.py
stadiamaps/models/extended_directions_options.py
stadiamaps/models/geo_attributes.py
stadiamaps/models/geo_json_geometry.py
stadiamaps/models/geo_json_geometry_base.py
Expand Down Expand Up @@ -178,6 +201,24 @@ stadiamaps/models/nearest_roads_request.py
stadiamaps/models/node_id.py
stadiamaps/models/node_type.py
stadiamaps/models/optimized_route_request.py
stadiamaps/models/osrm_admin.py
stadiamaps/models/osrm_annotation.py
stadiamaps/models/osrm_banner_component.py
stadiamaps/models/osrm_banner_content.py
stadiamaps/models/osrm_banner_instruction.py
stadiamaps/models/osrm_base_api_response.py
stadiamaps/models/osrm_guidance_modifier.py
stadiamaps/models/osrm_intersection.py
stadiamaps/models/osrm_lane.py
stadiamaps/models/osrm_route.py
stadiamaps/models/osrm_route_leg.py
stadiamaps/models/osrm_route_response.py
stadiamaps/models/osrm_route_step.py
stadiamaps/models/osrm_speed_limit.py
stadiamaps/models/osrm_step_maneuver.py
stadiamaps/models/osrm_via_waypoint.py
stadiamaps/models/osrm_voice_instruction.py
stadiamaps/models/osrm_waypoint.py
stadiamaps/models/pedestrian_costing_options.py
stadiamaps/models/pelias_geo_json_feature.py
stadiamaps/models/pelias_geo_json_properties.py
Expand All @@ -188,6 +229,7 @@ stadiamaps/models/pelias_response.py
stadiamaps/models/pelias_source.py
stadiamaps/models/restrictions.py
stadiamaps/models/road_class.py
stadiamaps/models/route200_response.py
stadiamaps/models/route_leg.py
stadiamaps/models/route_maneuver.py
stadiamaps/models/route_request.py
Expand Down Expand Up @@ -219,5 +261,4 @@ stadiamaps/py.typed
stadiamaps/rest.py
test-requirements.txt
test/__init__.py
test/test_bulk_request_query.py
tox.ini
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.7.0
7.8.0
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Version 4.0.0 - 2024-09-04

### Added

- Support for the OSRM format and navigation aids
- BREAKING: To support the new format, the response type of directions APIs has changed

You will now need to access the `actual_instance` property of API responses that return directions responses.
Aside from this, your existing code should work.

```python
res = api_instance.route(req).actual_instance
```

## Version 3.2.0 - 2024-08-15

### Added
Expand Down
30 changes: 30 additions & 0 deletions docs/AnnotationFilters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# AnnotationFilters


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**action** | **str** | | [optional]
**attributes** | **List[str]** | A set of granular attributes to include between every pair of coordinates along the route. This can significantly increase the response size. | [optional]

## Example

```python
from stadiamaps.models.annotation_filters import AnnotationFilters

# TODO update the JSON string below
json = "{}"
# create an instance of AnnotationFilters from a JSON string
annotation_filters_instance = AnnotationFilters.from_json(json)
# print the JSON string representation of the object
print(AnnotationFilters.to_json())

# convert the object into a dict
annotation_filters_dict = annotation_filters_instance.to_dict()
# create an instance of AnnotationFilters from a dict
annotation_filters_from_dict = AnnotationFilters.from_dict(annotation_filters_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


32 changes: 32 additions & 0 deletions docs/ExtendedDirectionsOptions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# ExtendedDirectionsOptions


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**format** | **str** | The output response format. The default JSON format is extremely compact and ideal for web or data-constrained use cases where you want to fetch additional attributes on demand in small chunks. The OSRM format is much richer and is configurable with significantly more info for turn-by-turn navigation use cases. | [optional]
**banner_instructions** | **bool** | Optionally includes helpful banners with timing information for turn-by-turn navigation. This is only available in the OSRM format. | [optional]
**voice_instructions** | **bool** | Optionally includes voice instructions with timing information for turn-by-turn navigation. This is only available in the OSRM format. | [optional]
**filters** | [**AnnotationFilters**](AnnotationFilters.md) | | [optional]

## Example

```python
from stadiamaps.models.extended_directions_options import ExtendedDirectionsOptions

# TODO update the JSON string below
json = "{}"
# create an instance of ExtendedDirectionsOptions from a JSON string
extended_directions_options_instance = ExtendedDirectionsOptions.from_json(json)
# print the JSON string representation of the object
print(ExtendedDirectionsOptions.to_json())

# convert the object into a dict
extended_directions_options_dict = extended_directions_options_instance.to_dict()
# create an instance of ExtendedDirectionsOptions from a dict
extended_directions_options_from_dict = ExtendedDirectionsOptions.from_dict(extended_directions_options_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


4 changes: 4 additions & 0 deletions docs/MapMatchRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Name | Type | Description | Notes
**units** | [**DistanceUnit**](DistanceUnit.md) | | [optional] [default to DistanceUnit.KM]
**language** | [**ValhallaLanguages**](ValhallaLanguages.md) | | [optional] [default to ValhallaLanguages.EN_MINUS_US]
**directions_type** | **str** | The level of directional narrative to include. Locations and times will always be returned, but narrative generation verbosity can be controlled with this parameter. | [optional] [default to 'instructions']
**format** | **str** | The output response format. The default JSON format is extremely compact and ideal for web or data-constrained use cases where you want to fetch additional attributes on demand in small chunks. The OSRM format is much richer and is configurable with significantly more info for turn-by-turn navigation use cases. | [optional]
**banner_instructions** | **bool** | Optionally includes helpful banners with timing information for turn-by-turn navigation. This is only available in the OSRM format. | [optional]
**voice_instructions** | **bool** | Optionally includes voice instructions with timing information for turn-by-turn navigation. This is only available in the OSRM format. | [optional]
**filters** | [**AnnotationFilters**](AnnotationFilters.md) | | [optional]
**begin_time** | **int** | The timestamp at the start of the trace. Combined with `durations`, this provides a way to include timing information for an `encoded_polyline` trace. | [optional]
**durations** | **int** | A list of durations (in seconds) between each successive pair of points in a polyline. | [optional]
**use_timestamps** | **bool** | If true, the input timestamps or durations should be used when computing elapsed time for each edge along the matched path rather than the routing algorithm estimates. | [optional] [default to False]
Expand Down
4 changes: 4 additions & 0 deletions docs/OptimizedRouteRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ Name | Type | Description | Notes
**units** | [**DistanceUnit**](DistanceUnit.md) | | [optional] [default to DistanceUnit.KM]
**language** | [**ValhallaLanguages**](ValhallaLanguages.md) | | [optional] [default to ValhallaLanguages.EN_MINUS_US]
**directions_type** | **str** | The level of directional narrative to include. Locations and times will always be returned, but narrative generation verbosity can be controlled with this parameter. | [optional] [default to 'instructions']
**format** | **str** | The output response format. The default JSON format is extremely compact and ideal for web or data-constrained use cases where you want to fetch additional attributes on demand in small chunks. The OSRM format is much richer and is configurable with significantly more info for turn-by-turn navigation use cases. | [optional]
**banner_instructions** | **bool** | Optionally includes helpful banners with timing information for turn-by-turn navigation. This is only available in the OSRM format. | [optional]
**voice_instructions** | **bool** | Optionally includes voice instructions with timing information for turn-by-turn navigation. This is only available in the OSRM format. | [optional]
**filters** | [**AnnotationFilters**](AnnotationFilters.md) | | [optional]
**id** | **str** | An identifier to disambiguate requests (echoed by the server). | [optional]
**locations** | [**List[Coordinate]**](Coordinate.md) | The list of locations. The first and last are assumed to be the start and end points, and all intermediate points are locations that you want to visit along the way. |
**costing** | [**MatrixCostingModel**](MatrixCostingModel.md) | |
Expand Down
30 changes: 30 additions & 0 deletions docs/OsrmAdmin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# OsrmAdmin


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**iso_3166_1** | **str** | The ISO 3166-1 two-character code for the admin region. | [optional]
**iso_3166_1_alpha3** | **str** | The ISO 3166-1 three-character code for the admin region. | [optional]

## Example

```python
from stadiamaps.models.osrm_admin import OsrmAdmin

# TODO update the JSON string below
json = "{}"
# create an instance of OsrmAdmin from a JSON string
osrm_admin_instance = OsrmAdmin.from_json(json)
# print the JSON string representation of the object
print(OsrmAdmin.to_json())

# convert the object into a dict
osrm_admin_dict = osrm_admin_instance.to_dict()
# create an instance of OsrmAdmin from a dict
osrm_admin_from_dict = OsrmAdmin.from_dict(osrm_admin_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


33 changes: 33 additions & 0 deletions docs/OsrmAnnotation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# OsrmAnnotation


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**distance** | **List[float]** | The distance, in meters, between each pair of coordinates. | [optional]
**duration** | **List[float]** | The duration between each pair of coordinates, in seconds. | [optional]
**weight** | **List[int]** | | [optional]
**speed** | **List[float]** | The estimated speed of travel between each pair of coordinates in meters/sec. | [optional]
**maxspeed** | [**List[OsrmSpeedLimit]**](OsrmSpeedLimit.md) | | [optional]

## Example

```python
from stadiamaps.models.osrm_annotation import OsrmAnnotation

# TODO update the JSON string below
json = "{}"
# create an instance of OsrmAnnotation from a JSON string
osrm_annotation_instance = OsrmAnnotation.from_json(json)
# print the JSON string representation of the object
print(OsrmAnnotation.to_json())

# convert the object into a dict
osrm_annotation_dict = osrm_annotation_instance.to_dict()
# create an instance of OsrmAnnotation from a dict
osrm_annotation_from_dict = OsrmAnnotation.from_dict(osrm_annotation_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


30 changes: 30 additions & 0 deletions docs/OsrmBannerComponent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# OsrmBannerComponent


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**text** | **str** | | [optional]
**type** | **str** | | [optional]

## Example

```python
from stadiamaps.models.osrm_banner_component import OsrmBannerComponent

# TODO update the JSON string below
json = "{}"
# create an instance of OsrmBannerComponent from a JSON string
osrm_banner_component_instance = OsrmBannerComponent.from_json(json)
# print the JSON string representation of the object
print(OsrmBannerComponent.to_json())

# convert the object into a dict
osrm_banner_component_dict = osrm_banner_component_instance.to_dict()
# create an instance of OsrmBannerComponent from a dict
osrm_banner_component_from_dict = OsrmBannerComponent.from_dict(osrm_banner_component_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


32 changes: 32 additions & 0 deletions docs/OsrmBannerContent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# OsrmBannerContent


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**text** | **str** | |
**type** | **str** | | [optional]
**modifier** | [**OsrmGuidanceModifier**](OsrmGuidanceModifier.md) | | [optional]
**components** | [**List[OsrmBannerComponent]**](OsrmBannerComponent.md) | A list of objects with additional context that allow for visual layout improvements beyond what's possible with plain text. | [optional]

## Example

```python
from stadiamaps.models.osrm_banner_content import OsrmBannerContent

# TODO update the JSON string below
json = "{}"
# create an instance of OsrmBannerContent from a JSON string
osrm_banner_content_instance = OsrmBannerContent.from_json(json)
# print the JSON string representation of the object
print(OsrmBannerContent.to_json())

# convert the object into a dict
osrm_banner_content_dict = osrm_banner_content_instance.to_dict()
# create an instance of OsrmBannerContent from a dict
osrm_banner_content_from_dict = OsrmBannerContent.from_dict(osrm_banner_content_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


31 changes: 31 additions & 0 deletions docs/OsrmBannerInstruction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# OsrmBannerInstruction


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**distance_along_geometry** | **float** | How far (in meters) from the upcoming maneuver the instruction should start being displayed. |
**primary** | [**OsrmBannerContent**](OsrmBannerContent.md) | |
**secondary** | [**OsrmBannerContent**](OsrmBannerContent.md) | | [optional]

## Example

```python
from stadiamaps.models.osrm_banner_instruction import OsrmBannerInstruction

# TODO update the JSON string below
json = "{}"
# create an instance of OsrmBannerInstruction from a JSON string
osrm_banner_instruction_instance = OsrmBannerInstruction.from_json(json)
# print the JSON string representation of the object
print(OsrmBannerInstruction.to_json())

# convert the object into a dict
osrm_banner_instruction_dict = osrm_banner_instruction_instance.to_dict()
# create an instance of OsrmBannerInstruction from a dict
osrm_banner_instruction_from_dict = OsrmBannerInstruction.from_dict(osrm_banner_instruction_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


Loading

0 comments on commit b1e00ef

Please sign in to comment.