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\FactCheckTools\Resource;
19
20use Google\Service\FactCheckTools\GoogleFactcheckingFactchecktoolsV1alpha1FactCheckedClaimSearchResponse;
21
22/**
23 * The "claims" collection of methods.
24 * Typical usage is:
25 *  <code>
26 *   $factchecktoolsService = new Google\Service\FactCheckTools(...);
27 *   $claims = $factchecktoolsService->claims;
28 *  </code>
29 */
30class Claims extends \Google\Service\Resource
31{
32  /**
33   * Search through fact-checked claims. (claims.search)
34   *
35   * @param array $optParams Optional parameters.
36   *
37   * @opt_param string languageCode The BCP-47 language code, such as "en-US" or
38   * "sr-Latn". Can be used to restrict results by language, though we do not
39   * currently consider the region.
40   * @opt_param int maxAgeDays The maximum age of the returned search results, in
41   * days. Age is determined by either claim date or review date, whichever is
42   * newer.
43   * @opt_param int offset An integer that specifies the current offset (that is,
44   * starting result location) in search results. This field is only considered if
45   * `page_token` is unset. For example, 0 means to return results starting from
46   * the first matching result, and 10 means to return from the 11th result.
47   * @opt_param int pageSize The pagination size. We will return up to that many
48   * results. Defaults to 10 if not set.
49   * @opt_param string pageToken The pagination token. You may provide the
50   * `next_page_token` returned from a previous List request, if any, in order to
51   * get the next page. All other fields must have the same values as in the
52   * previous request.
53   * @opt_param string query Textual query string. Required unless
54   * `review_publisher_site_filter` is specified.
55   * @opt_param string reviewPublisherSiteFilter The review publisher site to
56   * filter results by, e.g. nytimes.com.
57   * @return GoogleFactcheckingFactchecktoolsV1alpha1FactCheckedClaimSearchResponse
58   */
59  public function search($optParams = [])
60  {
61    $params = [];
62    $params = array_merge($params, $optParams);
63    return $this->call('search', [$params], GoogleFactcheckingFactchecktoolsV1alpha1FactCheckedClaimSearchResponse::class);
64  }
65}
66
67// Adding a class alias for backwards compatibility with the previous class name.
68class_alias(Claims::class, 'Google_Service_FactCheckTools_Resource_Claims');
69