source: vendor/google/apiclient-services/src/Books/Resource/MylibraryAnnotations.php

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

Upload project files

  • Property mode set to 100644
File size: 5.2 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\Books\Resource;
19
20use Google\Service\Books\Annotation;
21use Google\Service\Books\Annotations;
22use Google\Service\Books\AnnotationsSummary;
23use Google\Service\Books\BooksEmpty;
24
25/**
26 * The "annotations" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $booksService = new Google\Service\Books(...);
30 * $annotations = $booksService->mylibrary_annotations;
31 * </code>
32 */
33class MylibraryAnnotations extends \Google\Service\Resource
34{
35 /**
36 * Deletes an annotation. (annotations.delete)
37 *
38 * @param string $annotationId The ID for the annotation to delete.
39 * @param array $optParams Optional parameters.
40 *
41 * @opt_param string source String to identify the originator of this request.
42 * @return BooksEmpty
43 * @throws \Google\Service\Exception
44 */
45 public function delete($annotationId, $optParams = [])
46 {
47 $params = ['annotationId' => $annotationId];
48 $params = array_merge($params, $optParams);
49 return $this->call('delete', [$params], BooksEmpty::class);
50 }
51 /**
52 * Inserts a new annotation. (annotations.insert)
53 *
54 * @param Annotation $postBody
55 * @param array $optParams Optional parameters.
56 *
57 * @opt_param string annotationId The ID for the annotation to insert.
58 * @opt_param string country ISO-3166-1 code to override the IP-based location.
59 * @opt_param bool showOnlySummaryInResponse Requests that only the summary of
60 * the specified layer be provided in the response.
61 * @opt_param string source String to identify the originator of this request.
62 * @return Annotation
63 * @throws \Google\Service\Exception
64 */
65 public function insert(Annotation $postBody, $optParams = [])
66 {
67 $params = ['postBody' => $postBody];
68 $params = array_merge($params, $optParams);
69 return $this->call('insert', [$params], Annotation::class);
70 }
71 /**
72 * Retrieves a list of annotations, possibly filtered.
73 * (annotations.listMylibraryAnnotations)
74 *
75 * @param array $optParams Optional parameters.
76 *
77 * @opt_param string contentVersion The content version for the requested
78 * volume.
79 * @opt_param string layerId The layer ID to limit annotation by.
80 * @opt_param string layerIds The layer ID(s) to limit annotation by.
81 * @opt_param string maxResults Maximum number of results to return
82 * @opt_param string pageToken The value of the nextToken from the previous
83 * page.
84 * @opt_param bool showDeleted Set to true to return deleted annotations.
85 * updatedMin must be in the request to use this. Defaults to false.
86 * @opt_param string source String to identify the originator of this request.
87 * @opt_param string updatedMax RFC 3339 timestamp to restrict to items updated
88 * prior to this timestamp (exclusive).
89 * @opt_param string updatedMin RFC 3339 timestamp to restrict to items updated
90 * since this timestamp (inclusive).
91 * @opt_param string volumeId The volume to restrict annotations to.
92 * @return Annotations
93 * @throws \Google\Service\Exception
94 */
95 public function listMylibraryAnnotations($optParams = [])
96 {
97 $params = [];
98 $params = array_merge($params, $optParams);
99 return $this->call('list', [$params], Annotations::class);
100 }
101 /**
102 * Gets the summary of specified layers. (annotations.summary)
103 *
104 * @param string|array $layerIds Array of layer IDs to get the summary for.
105 * @param string $volumeId Volume id to get the summary for.
106 * @param array $optParams Optional parameters.
107 *
108 * @opt_param string source Optional. String to identify the originator of this
109 * request.
110 * @return AnnotationsSummary
111 * @throws \Google\Service\Exception
112 */
113 public function summary($layerIds, $volumeId, $optParams = [])
114 {
115 $params = ['layerIds' => $layerIds, 'volumeId' => $volumeId];
116 $params = array_merge($params, $optParams);
117 return $this->call('summary', [$params], AnnotationsSummary::class);
118 }
119 /**
120 * Updates an existing annotation. (annotations.update)
121 *
122 * @param string $annotationId The ID for the annotation to update.
123 * @param Annotation $postBody
124 * @param array $optParams Optional parameters.
125 *
126 * @opt_param string source String to identify the originator of this request.
127 * @return Annotation
128 * @throws \Google\Service\Exception
129 */
130 public function update($annotationId, Annotation $postBody, $optParams = [])
131 {
132 $params = ['annotationId' => $annotationId, 'postBody' => $postBody];
133 $params = array_merge($params, $optParams);
134 return $this->call('update', [$params], Annotation::class);
135 }
136}
137
138// Adding a class alias for backwards compatibility with the previous class name.
139class_alias(MylibraryAnnotations::class, 'Google_Service_Books_Resource_MylibraryAnnotations');
Note: See TracBrowser for help on using the repository browser.