source: vendor/google/apiclient-services/src/Script/Resource/ProjectsVersions.php@ e3d4e0a

Last change on this file since e3d4e0a was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 10 days ago

Upload project files

  • Property mode set to 100644
File size: 3.0 KB
Line 
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
18namespace Google\Service\Script\Resource;
19
20use Google\Service\Script\ListVersionsResponse;
21use Google\Service\Script\Version;
22
23/**
24 * The "versions" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $scriptService = new Google\Service\Script(...);
28 * $versions = $scriptService->projects_versions;
29 * </code>
30 */
31class ProjectsVersions extends \Google\Service\Resource
32{
33 /**
34 * Creates a new immutable version using the current code, with a unique version
35 * number. (versions.create)
36 *
37 * @param string $scriptId The script project's Drive ID.
38 * @param Version $postBody
39 * @param array $optParams Optional parameters.
40 * @return Version
41 * @throws \Google\Service\Exception
42 */
43 public function create($scriptId, Version $postBody, $optParams = [])
44 {
45 $params = ['scriptId' => $scriptId, 'postBody' => $postBody];
46 $params = array_merge($params, $optParams);
47 return $this->call('create', [$params], Version::class);
48 }
49 /**
50 * Gets a version of a script project. (versions.get)
51 *
52 * @param string $scriptId The script project's Drive ID.
53 * @param int $versionNumber The version number.
54 * @param array $optParams Optional parameters.
55 * @return Version
56 * @throws \Google\Service\Exception
57 */
58 public function get($scriptId, $versionNumber, $optParams = [])
59 {
60 $params = ['scriptId' => $scriptId, 'versionNumber' => $versionNumber];
61 $params = array_merge($params, $optParams);
62 return $this->call('get', [$params], Version::class);
63 }
64 /**
65 * List the versions of a script project. (versions.listProjectsVersions)
66 *
67 * @param string $scriptId The script project's Drive ID.
68 * @param array $optParams Optional parameters.
69 *
70 * @opt_param int pageSize The maximum number of versions on each returned page.
71 * Defaults to 50.
72 * @opt_param string pageToken The token for continuing a previous list request
73 * on the next page. This should be set to the value of `nextPageToken` from a
74 * previous response.
75 * @return ListVersionsResponse
76 * @throws \Google\Service\Exception
77 */
78 public function listProjectsVersions($scriptId, $optParams = [])
79 {
80 $params = ['scriptId' => $scriptId];
81 $params = array_merge($params, $optParams);
82 return $this->call('list', [$params], ListVersionsResponse::class);
83 }
84}
85
86// Adding a class alias for backwards compatibility with the previous class name.
87class_alias(ProjectsVersions::class, 'Google_Service_Script_Resource_ProjectsVersions');
Note: See TracBrowser for help on using the repository browser.