Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Add documentation to directions service #210

Merged
merged 1 commit into from
Jan 17, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions mapbox/services/directions.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,25 @@ def directions(self, features, profile='mapbox.driving', alternatives=None,
instructions=None, geometry=None, steps=None):
"""Request directions for waypoints encoded as GeoJSON features.

:param features: sequence of GeoJSON features.
:param profile: name of a profile.
Parameters
----------
features : list
List of GeoJSON features.
profile : str
Name of a Mapbox profile such as 'mapbox.driving'.
alternatives : bool

instructions : str

geometry : str

steps : bool


Returns
-------
response
It returns a response object with a geojson() method for accessing the route(s) as a GeoJSON-like FeatureCollection dictionary.
"""
profile = self._validate_profile(profile)
instructions = self._validate_instruction_format(instructions)
Expand Down