/lib/vendor/google/apiclient-services/src/Google/Service/StreetViewPublish/Resource/Photos.php

https://gitlab.com/efabian/maya · PHP · 139 lines · 28 code · 1 blank · 110 comment · 0 complexity · 6ef67e26ee56e26e0121a9f2b48e914e MD5 · raw file

  1. <?php
  2. /*
  3. * Copyright 2014 Google Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6. * use this file except in compliance with the License. You may obtain a copy of
  7. * the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  14. * License for the specific language governing permissions and limitations under
  15. * the License.
  16. */
  17. /**
  18. * The "photos" collection of methods.
  19. * Typical usage is:
  20. * <code>
  21. * $streetviewpublishService = new Google_Service_StreetViewPublish(...);
  22. * $photos = $streetviewpublishService->photos;
  23. * </code>
  24. */
  25. class Google_Service_StreetViewPublish_Resource_Photos extends Google_Service_Resource
  26. {
  27. /**
  28. * Deletes a list of Photos and their metadata.
  29. *
  30. * Note that if BatchDeletePhotos fails, either critical fields are missing or
  31. * there is an authentication error. Even if BatchDeletePhotos succeeds,
  32. * individual photos in the batch may have failures. These failures are
  33. * specified in each PhotoResponse.status in BatchDeletePhotosResponse.results.
  34. * See DeletePhoto for specific failures that can occur per photo.
  35. * (photos.batchDelete)
  36. *
  37. * @param Google_Service_StreetViewPublish_BatchDeletePhotosRequest $postBody
  38. * @param array $optParams Optional parameters.
  39. * @return Google_Service_StreetViewPublish_BatchDeletePhotosResponse
  40. */
  41. public function batchDelete(Google_Service_StreetViewPublish_BatchDeletePhotosRequest $postBody, $optParams = array())
  42. {
  43. $params = array('postBody' => $postBody);
  44. $params = array_merge($params, $optParams);
  45. return $this->call('batchDelete', array($params), "Google_Service_StreetViewPublish_BatchDeletePhotosResponse");
  46. }
  47. /**
  48. * Gets the metadata of the specified Photo batch.
  49. *
  50. * Note that if BatchGetPhotos fails, either critical fields are missing or
  51. * there is an authentication error. Even if BatchGetPhotos succeeds, individual
  52. * photos in the batch may have failures. These failures are specified in each
  53. * PhotoResponse.status in BatchGetPhotosResponse.results. See GetPhoto for
  54. * specific failures that can occur per photo. (photos.batchGet)
  55. *
  56. * @param array $optParams Optional parameters.
  57. *
  58. * @opt_param string languageCode The BCP-47 language code, such as "en-US" or
  59. * "sr-Latn". For more information, see
  60. * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If
  61. * language_code is unspecified, the user's language preference for Google
  62. * services is used.
  63. * @opt_param string photoIds Required. IDs of the Photos. For HTTP GET
  64. * requests, the URL query parameter should be `photoIds==&...`.
  65. * @opt_param string view Required. Specifies if a download URL for the photo
  66. * bytes should be returned in the Photo response.
  67. * @return Google_Service_StreetViewPublish_BatchGetPhotosResponse
  68. */
  69. public function batchGet($optParams = array())
  70. {
  71. $params = array();
  72. $params = array_merge($params, $optParams);
  73. return $this->call('batchGet', array($params), "Google_Service_StreetViewPublish_BatchGetPhotosResponse");
  74. }
  75. /**
  76. * Updates the metadata of Photos, such as pose, place association, connections,
  77. * etc. Changing the pixels of photos is not supported.
  78. *
  79. * Note that if BatchUpdatePhotos fails, either critical fields are missing or
  80. * there is an authentication error. Even if BatchUpdatePhotos succeeds,
  81. * individual photos in the batch may have failures. These failures are
  82. * specified in each PhotoResponse.status in BatchUpdatePhotosResponse.results.
  83. * See UpdatePhoto for specific failures that can occur per photo.
  84. *
  85. * Only the fields specified in updateMask field are used. If `updateMask` is
  86. * not present, the update applies to all fields.
  87. *
  88. * The number of UpdatePhotoRequest messages in a BatchUpdatePhotosRequest must
  89. * not exceed 20.
  90. *
  91. * Note: To update Pose.altitude, Pose.latLngPair has to be filled as well.
  92. * Otherwise, the request will fail. (photos.batchUpdate)
  93. *
  94. * @param Google_Service_StreetViewPublish_BatchUpdatePhotosRequest $postBody
  95. * @param array $optParams Optional parameters.
  96. * @return Google_Service_StreetViewPublish_BatchUpdatePhotosResponse
  97. */
  98. public function batchUpdate(Google_Service_StreetViewPublish_BatchUpdatePhotosRequest $postBody, $optParams = array())
  99. {
  100. $params = array('postBody' => $postBody);
  101. $params = array_merge($params, $optParams);
  102. return $this->call('batchUpdate', array($params), "Google_Service_StreetViewPublish_BatchUpdatePhotosResponse");
  103. }
  104. /**
  105. * Lists all the Photos that belong to the user.
  106. *
  107. * Note: Recently created photos that are still being indexed are not returned
  108. * in the response. (photos.listPhotos)
  109. *
  110. * @param array $optParams Optional parameters.
  111. *
  112. * @opt_param string filter Required. The filter expression. For example:
  113. * `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw`.
  114. *
  115. * The only filter supported at the moment is `placeId`.
  116. * @opt_param string languageCode The BCP-47 language code, such as "en-US" or
  117. * "sr-Latn". For more information, see
  118. * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If
  119. * language_code is unspecified, the user's language preference for Google
  120. * services is used.
  121. * @opt_param string pageToken The nextPageToken value returned from a previous
  122. * ListPhotos request, if any.
  123. * @opt_param int pageSize The maximum number of photos to return. `pageSize`
  124. * must be non-negative. If `pageSize` is zero or is not provided, the default
  125. * page size of 100 is used. The number of photos returned in the response may
  126. * be less than `pageSize` if the number of photos that belong to the user is
  127. * less than `pageSize`.
  128. * @opt_param string view Required. Specifies if a download URL for the photos
  129. * bytes should be returned in the Photos response.
  130. * @return Google_Service_StreetViewPublish_ListPhotosResponse
  131. */
  132. public function listPhotos($optParams = array())
  133. {
  134. $params = array();
  135. $params = array_merge($params, $optParams);
  136. return $this->call('list', array($params), "Google_Service_StreetViewPublish_ListPhotosResponse");
  137. }
  138. }