Method: projects.trips.get

取得行程。

HTTP 要求

GET https://navigationconnect.googleapis.com/v1/{name=projects/*/trips/*}

這個網址使用 gRPC 轉碼語法。

路徑參數

參數
name

string

必填。要取得的行程資源名稱。格式:projects/{project}/trips/{tripId}

查詢參數

參數
routePolylineFormat

enum (RoutePolylineFormat)

(選用步驟) 要傳回的路徑折線格式。如未設定,系統會傳回 SIMPLE 路線折線。

要求主體

要求主體必須為空白。

回應主體

如果成功,回應主體會包含 Trip 的執行個體。

授權範圍

需要下列 OAuth 範圍:

  • https://www.googleapis.com/auth/cloud-platform

IAM 權限

需要 name 資源的下列 IAM 權限:

  • navigationconnect.trips.get

詳情請參閱 IAM 說明文件

RoutePolylineFormat

指定路線折線的格式。

列舉
ROUTE_POLYLINE_FORMAT_UNSPECIFIED 未指定路線折線格式。
SIMPLE 路線折線會以簡單的點陣列形式傳回,並以 google.type.LatLng 表示。
ENCODED 路線折線會以編碼字串的形式傳回。請參閱 https://developers.google.com/maps/documentation/utilities/polylinealgorithm
S2ENCODED 路線折線會編碼為 S2Polyline。請參閱 https://s2geometry.io/devguide/basic_types.html
GEO_JSON 路線折線會以 GeoJSON LineString 形式傳回。請參閱 https://tools.ietf.org/html/rfc7946#section-3.1.4