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\Books\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Books\Annotationsdata;
|
---|
21 | use Google\Service\Books\DictionaryAnnotationdata;
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * The "annotationData" collection of methods.
|
---|
25 | * Typical usage is:
|
---|
26 | * <code>
|
---|
27 | * $booksService = new Google\Service\Books(...);
|
---|
28 | * $annotationData = $booksService->layers_annotationData;
|
---|
29 | * </code>
|
---|
30 | */
|
---|
31 | class LayersAnnotationData extends \Google\Service\Resource
|
---|
32 | {
|
---|
33 | /**
|
---|
34 | * Gets the annotation data. (annotationData.get)
|
---|
35 | *
|
---|
36 | * @param string $volumeId The volume to retrieve annotations for.
|
---|
37 | * @param string $layerId The ID for the layer to get the annotations.
|
---|
38 | * @param string $annotationDataId The ID of the annotation data to retrieve.
|
---|
39 | * @param string $contentVersion The content version for the volume you are
|
---|
40 | * trying to retrieve.
|
---|
41 | * @param array $optParams Optional parameters.
|
---|
42 | *
|
---|
43 | * @opt_param bool allowWebDefinitions For the dictionary layer. Whether or not
|
---|
44 | * to allow web definitions.
|
---|
45 | * @opt_param int h The requested pixel height for any images. If height is
|
---|
46 | * provided width must also be provided.
|
---|
47 | * @opt_param string locale The locale information for the data. ISO-639-1
|
---|
48 | * language and ISO-3166-1 country code. Ex: 'en_US'.
|
---|
49 | * @opt_param int scale The requested scale for the image.
|
---|
50 | * @opt_param string source String to identify the originator of this request.
|
---|
51 | * @opt_param int w The requested pixel width for any images. If width is
|
---|
52 | * provided height must also be provided.
|
---|
53 | * @return DictionaryAnnotationdata
|
---|
54 | * @throws \Google\Service\Exception
|
---|
55 | */
|
---|
56 | public function get($volumeId, $layerId, $annotationDataId, $contentVersion, $optParams = [])
|
---|
57 | {
|
---|
58 | $params = ['volumeId' => $volumeId, 'layerId' => $layerId, 'annotationDataId' => $annotationDataId, 'contentVersion' => $contentVersion];
|
---|
59 | $params = array_merge($params, $optParams);
|
---|
60 | return $this->call('get', [$params], DictionaryAnnotationdata::class);
|
---|
61 | }
|
---|
62 | /**
|
---|
63 | * Gets the annotation data for a volume and layer.
|
---|
64 | * (annotationData.listLayersAnnotationData)
|
---|
65 | *
|
---|
66 | * @param string $volumeId The volume to retrieve annotation data for.
|
---|
67 | * @param string $layerId The ID for the layer to get the annotation data.
|
---|
68 | * @param string $contentVersion The content version for the requested volume.
|
---|
69 | * @param array $optParams Optional parameters.
|
---|
70 | *
|
---|
71 | * @opt_param string annotationDataId The list of Annotation Data Ids to
|
---|
72 | * retrieve. Pagination is ignored if this is set.
|
---|
73 | * @opt_param int h The requested pixel height for any images. If height is
|
---|
74 | * provided width must also be provided.
|
---|
75 | * @opt_param string locale The locale information for the data. ISO-639-1
|
---|
76 | * language and ISO-3166-1 country code. Ex: 'en_US'.
|
---|
77 | * @opt_param string maxResults Maximum number of results to return
|
---|
78 | * @opt_param string pageToken The value of the nextToken from the previous
|
---|
79 | * page.
|
---|
80 | * @opt_param int scale The requested scale for the image.
|
---|
81 | * @opt_param string source String to identify the originator of this request.
|
---|
82 | * @opt_param string updatedMax RFC 3339 timestamp to restrict to items updated
|
---|
83 | * prior to this timestamp (exclusive).
|
---|
84 | * @opt_param string updatedMin RFC 3339 timestamp to restrict to items updated
|
---|
85 | * since this timestamp (inclusive).
|
---|
86 | * @opt_param int w The requested pixel width for any images. If width is
|
---|
87 | * provided height must also be provided.
|
---|
88 | * @return Annotationsdata
|
---|
89 | * @throws \Google\Service\Exception
|
---|
90 | */
|
---|
91 | public function listLayersAnnotationData($volumeId, $layerId, $contentVersion, $optParams = [])
|
---|
92 | {
|
---|
93 | $params = ['volumeId' => $volumeId, 'layerId' => $layerId, 'contentVersion' => $contentVersion];
|
---|
94 | $params = array_merge($params, $optParams);
|
---|
95 | return $this->call('list', [$params], Annotationsdata::class);
|
---|
96 | }
|
---|
97 | }
|
---|
98 |
|
---|
99 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
100 | class_alias(LayersAnnotationData::class, 'Google_Service_Books_Resource_LayersAnnotationData');
|
---|