[e3d4e0a] | 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 | namespace Google\Service\AndroidPublisher\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\AndroidPublisher\ImagesDeleteAllResponse;
|
---|
| 21 | use Google\Service\AndroidPublisher\ImagesListResponse;
|
---|
| 22 | use Google\Service\AndroidPublisher\ImagesUploadResponse;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "images" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $androidpublisherService = new Google\Service\AndroidPublisher(...);
|
---|
| 29 | * $images = $androidpublisherService->edits_images;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class EditsImages extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Deletes the image (specified by id) from the edit. (images.delete)
|
---|
| 36 | *
|
---|
| 37 | * @param string $packageName Package name of the app.
|
---|
| 38 | * @param string $editId Identifier of the edit.
|
---|
| 39 | * @param string $language Language localization code (a BCP-47 language tag;
|
---|
| 40 | * for example, "de-AT" for Austrian German).
|
---|
| 41 | * @param string $imageType Type of the Image.
|
---|
| 42 | * @param string $imageId Unique identifier an image within the set of images
|
---|
| 43 | * attached to this edit.
|
---|
| 44 | * @param array $optParams Optional parameters.
|
---|
| 45 | * @throws \Google\Service\Exception
|
---|
| 46 | */
|
---|
| 47 | public function delete($packageName, $editId, $language, $imageType, $imageId, $optParams = [])
|
---|
| 48 | {
|
---|
| 49 | $params = ['packageName' => $packageName, 'editId' => $editId, 'language' => $language, 'imageType' => $imageType, 'imageId' => $imageId];
|
---|
| 50 | $params = array_merge($params, $optParams);
|
---|
| 51 | return $this->call('delete', [$params]);
|
---|
| 52 | }
|
---|
| 53 | /**
|
---|
| 54 | * Deletes all images for the specified language and image type. Returns an
|
---|
| 55 | * empty response if no images are found. (images.deleteall)
|
---|
| 56 | *
|
---|
| 57 | * @param string $packageName Package name of the app.
|
---|
| 58 | * @param string $editId Identifier of the edit.
|
---|
| 59 | * @param string $language Language localization code (a BCP-47 language tag;
|
---|
| 60 | * for example, "de-AT" for Austrian German). Providing a language that is not
|
---|
| 61 | * supported by the App is a no-op.
|
---|
| 62 | * @param string $imageType Type of the Image. Providing an image type that
|
---|
| 63 | * refers to no images is a no-op.
|
---|
| 64 | * @param array $optParams Optional parameters.
|
---|
| 65 | * @return ImagesDeleteAllResponse
|
---|
| 66 | * @throws \Google\Service\Exception
|
---|
| 67 | */
|
---|
| 68 | public function deleteall($packageName, $editId, $language, $imageType, $optParams = [])
|
---|
| 69 | {
|
---|
| 70 | $params = ['packageName' => $packageName, 'editId' => $editId, 'language' => $language, 'imageType' => $imageType];
|
---|
| 71 | $params = array_merge($params, $optParams);
|
---|
| 72 | return $this->call('deleteall', [$params], ImagesDeleteAllResponse::class);
|
---|
| 73 | }
|
---|
| 74 | /**
|
---|
| 75 | * Lists all images. The response may be empty. (images.listEditsImages)
|
---|
| 76 | *
|
---|
| 77 | * @param string $packageName Package name of the app.
|
---|
| 78 | * @param string $editId Identifier of the edit.
|
---|
| 79 | * @param string $language Language localization code (a BCP-47 language tag;
|
---|
| 80 | * for example, "de-AT" for Austrian German). There must be a store listing for
|
---|
| 81 | * the specified language.
|
---|
| 82 | * @param string $imageType Type of the Image. Providing an image type that
|
---|
| 83 | * refers to no images will return an empty response.
|
---|
| 84 | * @param array $optParams Optional parameters.
|
---|
| 85 | * @return ImagesListResponse
|
---|
| 86 | * @throws \Google\Service\Exception
|
---|
| 87 | */
|
---|
| 88 | public function listEditsImages($packageName, $editId, $language, $imageType, $optParams = [])
|
---|
| 89 | {
|
---|
| 90 | $params = ['packageName' => $packageName, 'editId' => $editId, 'language' => $language, 'imageType' => $imageType];
|
---|
| 91 | $params = array_merge($params, $optParams);
|
---|
| 92 | return $this->call('list', [$params], ImagesListResponse::class);
|
---|
| 93 | }
|
---|
| 94 | /**
|
---|
| 95 | * Uploads an image of the specified language and image type, and adds to the
|
---|
| 96 | * edit. (images.upload)
|
---|
| 97 | *
|
---|
| 98 | * @param string $packageName Package name of the app.
|
---|
| 99 | * @param string $editId Identifier of the edit.
|
---|
| 100 | * @param string $language Language localization code (a BCP-47 language tag;
|
---|
| 101 | * for example, "de-AT" for Austrian German). Providing a language that is not
|
---|
| 102 | * supported by the App is a no-op.
|
---|
| 103 | * @param string $imageType Type of the Image.
|
---|
| 104 | * @param array $optParams Optional parameters.
|
---|
| 105 | * @return ImagesUploadResponse
|
---|
| 106 | * @throws \Google\Service\Exception
|
---|
| 107 | */
|
---|
| 108 | public function upload($packageName, $editId, $language, $imageType, $optParams = [])
|
---|
| 109 | {
|
---|
| 110 | $params = ['packageName' => $packageName, 'editId' => $editId, 'language' => $language, 'imageType' => $imageType];
|
---|
| 111 | $params = array_merge($params, $optParams);
|
---|
| 112 | return $this->call('upload', [$params], ImagesUploadResponse::class);
|
---|
| 113 | }
|
---|
| 114 | }
|
---|
| 115 |
|
---|
| 116 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 117 | class_alias(EditsImages::class, 'Google_Service_AndroidPublisher_Resource_EditsImages');
|
---|