Skip to content

Commit

Permalink
[cfr_api] Use the GMPRO API by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrasej committed Sep 11, 2024
1 parent 1a93e3f commit 1eb891d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions python/gmpro/json/cfr_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,29 +100,29 @@ def optimize_tours(
host: str | None = None,
path: str | None = None,
) -> cfr_json.OptimizeToursResponse:
"""Solves request using the Google CFR API.
"""Solves request using the GMPRO API.
Args:
request: The request to be solved.
google_cloud_project: The name of the Google Cloud project used in the API.
google_cloud_token: The Google Cloud access token used to invoke the API.
timeout: The solve deadline for the request.
host: The host of the CFR API endpoint. When None, the default CFR endpoint
is used.
host: The host of the GMPRO API endpoint. When None, the default GMPRO
endpoint is used.
path: The path of the optimizeTours API method. When it contains "{project}"
as a substring, it will be replaced by the name of the project when making
the HTTP API call. When None, the default CFR API path for optimizeTours
the HTTP API call. When None, the default GMPRO API path for optimizeTours
is used.
Returns:
Upon success, returns the response from the server.
Raises:
ApiCallError: When the CFR API invocation fails. The exception contains the
status, explanation, and the body of the response.
ApiCallError: When the GMPRO API invocation fails. The exception contains
the status, explanation, and the body of the response.
"""
if host is None:
host = "cloudoptimization.googleapis.com"
host = "routeoptimization.googleapis.com"
if path is None:
path = "/v1/projects/{project}:optimizeTours"
path = path.format(project=google_cloud_project)
Expand Down

0 comments on commit 1eb891d

Please sign in to comment.