Method: photo.get
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Pobiera metadane określonego elementu Photo
.
Ta metoda zwraca następujące kody błędów:
Żądanie HTTP
GET https://streetviewpublish.googleapis.com/v1/photo/{photoId}
Adres URL używa składni transkodowania gRPC.
Parametry ścieżki
Parametry |
photoId |
string
To pole jest wymagane. Identyfikator zasobu Photo .
|
Parametry zapytania
Parametry |
view |
enum (PhotoView )
To pole jest wymagane. Określa, czy w odpowiedzi Photo ma być zwracany adres URL pobierania bajtów zdjęcia.
|
languageCode |
string
Kod języka BCP-47, np. „en-US” lub „sr-Latn”. Więcej informacji znajdziesz na stronie http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Jeśli parametr languageCode nie został określony, używane są ustawienia języka użytkownika w usługach Google.
|
Treść żądania
Treść żądania musi być pusta.
Treść odpowiedzi
W przypadku powodzenia treść odpowiedzi obejmuje wystąpienie elementu Photo
.
Zakresy autoryzacji
Wymaga następującego zakresu OAuth:
https://www.googleapis.com/auth/streetviewpublish
Więcej informacji znajdziesz w artykule Omówienie protokołu OAuth 2.0.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-25 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-25 UTC."],[[["\u003cp\u003eRetrieves metadata for a specified Photo using its ID.\u003c/p\u003e\n"],["\u003cp\u003eAllows specifying the view (including download URL) and language code.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with the \u003ccode\u003estreetviewpublish\u003c/code\u003e scope.\u003c/p\u003e\n"],["\u003cp\u003eReturns a Photo object on success, or an error if permissions are lacking, the photo is not found, or is still being indexed.\u003c/p\u003e\n"]]],["This describes retrieving photo metadata using a GET request to `https://streetviewpublish.googleapis.com/v1/photo/{photoId}`. The `photoId` (required) must be specified as a path parameter. Optional query parameters include `view` (required) and `languageCode`. The request body must be empty, while a successful response will contain a Photo instance. Specific error codes are returned for permission issues, non-existent photos, or photos being indexed. The request requires `https://www.googleapis.com/auth/streetviewpublish` authorization.\n"],null,["# Method: photo.get\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nGets the metadata of the specified [Photo](/streetview/publish/reference/rest/v1/photo#Photo).\n\nThis method returns the following error codes:\n\n- [google.rpc.Code.PERMISSION_DENIED](/streetview/publish/reference/rest/v1/Code#ENUM_VALUES.PERMISSION_DENIED) if the requesting user did not create the requested [Photo](/streetview/publish/reference/rest/v1/photo#Photo).\n- [google.rpc.Code.NOT_FOUND](/streetview/publish/reference/rest/v1/Code#ENUM_VALUES.NOT_FOUND) if the requested [Photo](/streetview/publish/reference/rest/v1/photo#Photo) does not exist.\n- [google.rpc.Code.UNAVAILABLE](/streetview/publish/reference/rest/v1/Code#ENUM_VALUES.UNAVAILABLE) if the requested [Photo](/streetview/publish/reference/rest/v1/photo#Photo) is still being indexed.\n\n### HTTP request\n\n`GET https://streetviewpublish.googleapis.com/v1/photo/{photoId}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|-----------|------------------------------------------------------------------------------------------|\n| `photoId` | `string` Required. ID of the [Photo](/streetview/publish/reference/rest/v1/photo#Photo). |\n\n### Query parameters\n\n| Parameters ||\n|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `view` | `enum (`[PhotoView](/streetview/publish/reference/rest/v1/PhotoView)`)` Required. Specifies if a download URL for the photo bytes should be returned in the [Photo](/streetview/publish/reference/rest/v1/photo#Photo) response. |\n| `languageCode` | `string` The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see \u003chttp://www.unicode.org/reports/tr35/#Unicode_locale_identifier\u003e. If languageCode is unspecified, the user's language preference for Google services is used. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [Photo](/streetview/publish/reference/rest/v1/photo#Photo).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/streetviewpublish`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]