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\Category;
|
---|
21 | use Google\Service\Books\Volume2;
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * The "onboarding" collection of methods.
|
---|
25 | * Typical usage is:
|
---|
26 | * <code>
|
---|
27 | * $booksService = new Google\Service\Books(...);
|
---|
28 | * $onboarding = $booksService->onboarding;
|
---|
29 | * </code>
|
---|
30 | */
|
---|
31 | class Onboarding extends \Google\Service\Resource
|
---|
32 | {
|
---|
33 | /**
|
---|
34 | * List categories for onboarding experience. (onboarding.listCategories)
|
---|
35 | *
|
---|
36 | * @param array $optParams Optional parameters.
|
---|
37 | *
|
---|
38 | * @opt_param string locale ISO-639-1 language and ISO-3166-1 country code.
|
---|
39 | * Default is en-US if unset.
|
---|
40 | * @return Category
|
---|
41 | * @throws \Google\Service\Exception
|
---|
42 | */
|
---|
43 | public function listCategories($optParams = [])
|
---|
44 | {
|
---|
45 | $params = [];
|
---|
46 | $params = array_merge($params, $optParams);
|
---|
47 | return $this->call('listCategories', [$params], Category::class);
|
---|
48 | }
|
---|
49 | /**
|
---|
50 | * List available volumes under categories for onboarding experience.
|
---|
51 | * (onboarding.listCategoryVolumes)
|
---|
52 | *
|
---|
53 | * @param array $optParams Optional parameters.
|
---|
54 | *
|
---|
55 | * @opt_param string categoryId List of category ids requested.
|
---|
56 | * @opt_param string locale ISO-639-1 language and ISO-3166-1 country code.
|
---|
57 | * Default is en-US if unset.
|
---|
58 | * @opt_param string maxAllowedMaturityRating The maximum allowed maturity
|
---|
59 | * rating of returned volumes. Books with a higher maturity rating are filtered
|
---|
60 | * out.
|
---|
61 | * @opt_param string pageSize Number of maximum results per page to be included
|
---|
62 | * in the response.
|
---|
63 | * @opt_param string pageToken The value of the nextToken from the previous
|
---|
64 | * page.
|
---|
65 | * @return Volume2
|
---|
66 | * @throws \Google\Service\Exception
|
---|
67 | */
|
---|
68 | public function listCategoryVolumes($optParams = [])
|
---|
69 | {
|
---|
70 | $params = [];
|
---|
71 | $params = array_merge($params, $optParams);
|
---|
72 | return $this->call('listCategoryVolumes', [$params], Volume2::class);
|
---|
73 | }
|
---|
74 | }
|
---|
75 |
|
---|
76 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
77 | class_alias(Onboarding::class, 'Google_Service_Books_Resource_Onboarding');
|
---|