Skip to content

Historic Traffic DateTime parameter to Route Endpoints #623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

boonboonsiri
Copy link
Contributor

What?

Why?

How?

Screenshots (optional)

Anything Else? (optional)

@Copilot Copilot AI review requested due to automatic review settings July 18, 2025 16:21
Copy link

vercel bot commented Jul 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
documentation ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 18, 2025 4:23pm

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new dateTime parameter to multiple route calculation endpoints to support historical traffic data. The parameter allows users to specify a specific date and time for route calculations instead of using current traffic conditions.

  • Adds dateTime parameter documentation to four route-related API endpoints
  • Updates spell checker configuration to include the new datetime format string

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
docs/api.mdx Adds dateTime parameter documentation to route calculation endpoints
cspell.json Adds "DDTHH" to spell checker dictionary for datetime format validation

@@ -985,6 +985,7 @@ Calculates the travel distance and duration between an origin and a destination.
- **`units`** (string, optional): The distance units. A string, `metric` or `imperial`. Defaults to `imperial` if not provided. In the response, `distance.value` will be in meters for `metric` and in feet for `imperial`.
- **`avoid`** (string, optional): The features that calculated routes should avoid. A string, comma-separated, including one or more of `tolls`, `highways`, `ferries` and `borderCrossings`. No features are avoided if not provided.
- **`geometry`** (string, optional): The format of the `geometry` in the response. Valid values are `linestring`, `polyline5` and `polyline6`. `linestring` returns a GeoJSON `LineString`, `polyline5` returns a polyline with 5 decimal places of precision (compatible with other mapping providers) and `polyline6` returns a polyline with 6 decimal places of precision. Defaults to none if not provided.
- ** `dateTime`** (string, optional): The date and time of the trip provided as a string in `YYYY-MM-DDTHH:MM` format which will be used for historical traffic times. If not provided, the current date and time will be used.
Copy link
Preview

Copilot AI Jul 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The markdown formatting is incorrect. There should be no space between the asterisks and the parameter name. It should be **dateTime** instead of ** dateTime**.

Suggested change
- ** `dateTime`** (string, optional): The date and time of the trip provided as a string in `YYYY-MM-DDTHH:MM` format which will be used for historical traffic times. If not provided, the current date and time will be used.
- **`dateTime`** (string, optional): The date and time of the trip provided as a string in `YYYY-MM-DDTHH:MM` format which will be used for historical traffic times. If not provided, the current date and time will be used.

Copilot uses AI. Check for mistakes.

@@ -1054,6 +1055,7 @@ Calculates the travel distances and durations between multiple origins and desti
- **`mode`** (string, required): The travel mode. A string, one of `car`, `truck`, `foot`, or `bike`.
- **`units`** (string, optional): The distance units. A string, `metric` or `imperial`. Defaults to `imperial` if not provided.
- **`avoid`** (string, optional): The features that calculated routes should avoid. A string, comma-separated, including one or more of `tolls`, `highways` and `ferries`. No features are avoided if not provided.
- ** `dateTime`** (string, optional): The date and time of the trip provided as a string in `YYYY-MM-DDTHH:MM` format which will be used for historical traffic times. If not provided, the current date and time will be used.
Copy link
Preview

Copilot AI Jul 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The markdown formatting is incorrect. There should be no space between the asterisks and the parameter name. It should be **dateTime** instead of ** dateTime**.

Suggested change
- ** `dateTime`** (string, optional): The date and time of the trip provided as a string in `YYYY-MM-DDTHH:MM` format which will be used for historical traffic times. If not provided, the current date and time will be used.
- **`dateTime`** (string, optional): The date and time of the trip provided as a string in `YYYY-MM-DDTHH:MM` format which will be used for historical traffic times. If not provided, the current date and time will be used.

Copilot uses AI. Check for mistakes.

@@ -1304,6 +1306,7 @@ Calculates the most efficient route between two or more locations to visit in or
- **`units`** (string, optional): The distance units. A string, `metric` or `imperial`. Defaults to `imperial`.
- **`avoid`** (string, optional): The features that calculated routes should avoid. A string, comma-separated, including one or more of `tolls`, `highways`, `ferries` and `borderCrossings`. No features are avoided if not provided.
- **`geometry`** (string, optional): The format of the `geometry` in the response. Valid values are `linestring`, `polyline5` and `polyline6`. `linestring` returns a GeoJSON `LineString`, `polyline5` returns a polyline with 5 decimal places of precision (compatible with other mapping providers) and `polyline6` returns a polyline with 6 decimal places of precision. Defaults to `polyline6` if not provided.
- ** `dateTime`** (string, optional): The date and time of the trip provided as a string in `YYYY-MM-DDTHH:MM` format which will be used for historical traffic times. If not provided, the current date and time will be used.
Copy link
Preview

Copilot AI Jul 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The markdown formatting is incorrect. There should be no space between the asterisks and the parameter name. It should be **dateTime** instead of ** dateTime**.

Suggested change
- ** `dateTime`** (string, optional): The date and time of the trip provided as a string in `YYYY-MM-DDTHH:MM` format which will be used for historical traffic times. If not provided, the current date and time will be used.
- **`dateTime`** (string, optional): The date and time of the trip provided as a string in `YYYY-MM-DDTHH:MM` format which will be used for historical traffic times. If not provided, the current date and time will be used.

Copilot uses AI. Check for mistakes.

@@ -2301,6 +2304,7 @@ Calculates the optimal ordering and route to visit a list of locations.
- **`mode`** (string, optional): The travel mode. A string, one of `car`, `truck`, `foot`, or `bike`. Defaults to `car`.
- **`units`** (string, optional): The distance units. A string, `metric` or `imperial`. Defaults to `imperial`.
- **`geometry`** (string, optional): The format of the `geometry` in the response. Valid values are `linestring`, `polyline5` and `polyline6`. `linestring` returns a GeoJSON `LineString`, `polyline5` returns a polyline with 5 decimal places of precision (compatible with other mapping providers) and `polyline6` returns a polyline with 6 decimal places of precision. Defaults to none if not provided.
- ** `dateTime`** (string, optional): The date and time of the trip provided as a string in `YYYY-MM-DDTHH:MM` format which will be used for historical traffic times. If not provided, the current date and time will be used.
Copy link
Preview

Copilot AI Jul 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The markdown formatting is incorrect. There should be no space between the asterisks and the parameter name. It should be **dateTime** instead of ** dateTime**.

Suggested change
- ** `dateTime`** (string, optional): The date and time of the trip provided as a string in `YYYY-MM-DDTHH:MM` format which will be used for historical traffic times. If not provided, the current date and time will be used.
- **`dateTime`** (string, optional): The date and time of the trip provided as a string in `YYYY-MM-DDTHH:MM` format which will be used for historical traffic times. If not provided, the current date and time will be used.

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant