[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\Track;
|
---|
| 21 | use Google\Service\AndroidPublisher\TrackConfig;
|
---|
| 22 | use Google\Service\AndroidPublisher\TracksListResponse;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "tracks" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $androidpublisherService = new Google\Service\AndroidPublisher(...);
|
---|
| 29 | * $tracks = $androidpublisherService->edits_tracks;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class EditsTracks extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Creates a new track. (tracks.create)
|
---|
| 36 | *
|
---|
| 37 | * @param string $packageName Required. Package name of the app.
|
---|
| 38 | * @param string $editId Required. Identifier of the edit.
|
---|
| 39 | * @param TrackConfig $postBody
|
---|
| 40 | * @param array $optParams Optional parameters.
|
---|
| 41 | * @return Track
|
---|
| 42 | * @throws \Google\Service\Exception
|
---|
| 43 | */
|
---|
| 44 | public function create($packageName, $editId, TrackConfig $postBody, $optParams = [])
|
---|
| 45 | {
|
---|
| 46 | $params = ['packageName' => $packageName, 'editId' => $editId, 'postBody' => $postBody];
|
---|
| 47 | $params = array_merge($params, $optParams);
|
---|
| 48 | return $this->call('create', [$params], Track::class);
|
---|
| 49 | }
|
---|
| 50 | /**
|
---|
| 51 | * Gets a track. (tracks.get)
|
---|
| 52 | *
|
---|
| 53 | * @param string $packageName Package name of the app.
|
---|
| 54 | * @param string $editId Identifier of the edit.
|
---|
| 55 | * @param string $track Identifier of the track. [More on track
|
---|
| 56 | * name](https://developers.google.com/android-publisher/tracks#ff-track-name)
|
---|
| 57 | * @param array $optParams Optional parameters.
|
---|
| 58 | * @return Track
|
---|
| 59 | * @throws \Google\Service\Exception
|
---|
| 60 | */
|
---|
| 61 | public function get($packageName, $editId, $track, $optParams = [])
|
---|
| 62 | {
|
---|
| 63 | $params = ['packageName' => $packageName, 'editId' => $editId, 'track' => $track];
|
---|
| 64 | $params = array_merge($params, $optParams);
|
---|
| 65 | return $this->call('get', [$params], Track::class);
|
---|
| 66 | }
|
---|
| 67 | /**
|
---|
| 68 | * Lists all tracks. (tracks.listEditsTracks)
|
---|
| 69 | *
|
---|
| 70 | * @param string $packageName Package name of the app.
|
---|
| 71 | * @param string $editId Identifier of the edit.
|
---|
| 72 | * @param array $optParams Optional parameters.
|
---|
| 73 | * @return TracksListResponse
|
---|
| 74 | * @throws \Google\Service\Exception
|
---|
| 75 | */
|
---|
| 76 | public function listEditsTracks($packageName, $editId, $optParams = [])
|
---|
| 77 | {
|
---|
| 78 | $params = ['packageName' => $packageName, 'editId' => $editId];
|
---|
| 79 | $params = array_merge($params, $optParams);
|
---|
| 80 | return $this->call('list', [$params], TracksListResponse::class);
|
---|
| 81 | }
|
---|
| 82 | /**
|
---|
| 83 | * Patches a track. (tracks.patch)
|
---|
| 84 | *
|
---|
| 85 | * @param string $packageName Package name of the app.
|
---|
| 86 | * @param string $editId Identifier of the edit.
|
---|
| 87 | * @param string $track Identifier of the track. [More on track
|
---|
| 88 | * name](https://developers.google.com/android-publisher/tracks#ff-track-name)
|
---|
| 89 | * @param Track $postBody
|
---|
| 90 | * @param array $optParams Optional parameters.
|
---|
| 91 | * @return Track
|
---|
| 92 | * @throws \Google\Service\Exception
|
---|
| 93 | */
|
---|
| 94 | public function patch($packageName, $editId, $track, Track $postBody, $optParams = [])
|
---|
| 95 | {
|
---|
| 96 | $params = ['packageName' => $packageName, 'editId' => $editId, 'track' => $track, 'postBody' => $postBody];
|
---|
| 97 | $params = array_merge($params, $optParams);
|
---|
| 98 | return $this->call('patch', [$params], Track::class);
|
---|
| 99 | }
|
---|
| 100 | /**
|
---|
| 101 | * Updates a track. (tracks.update)
|
---|
| 102 | *
|
---|
| 103 | * @param string $packageName Package name of the app.
|
---|
| 104 | * @param string $editId Identifier of the edit.
|
---|
| 105 | * @param string $track Identifier of the track. [More on track
|
---|
| 106 | * name](https://developers.google.com/android-publisher/tracks#ff-track-name)
|
---|
| 107 | * @param Track $postBody
|
---|
| 108 | * @param array $optParams Optional parameters.
|
---|
| 109 | * @return Track
|
---|
| 110 | * @throws \Google\Service\Exception
|
---|
| 111 | */
|
---|
| 112 | public function update($packageName, $editId, $track, Track $postBody, $optParams = [])
|
---|
| 113 | {
|
---|
| 114 | $params = ['packageName' => $packageName, 'editId' => $editId, 'track' => $track, 'postBody' => $postBody];
|
---|
| 115 | $params = array_merge($params, $optParams);
|
---|
| 116 | return $this->call('update', [$params], Track::class);
|
---|
| 117 | }
|
---|
| 118 | }
|
---|
| 119 |
|
---|
| 120 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 121 | class_alias(EditsTracks::class, 'Google_Service_AndroidPublisher_Resource_EditsTracks');
|
---|