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; 19 20use Google\Client; 21 22/** 23 * Service definition for FactCheckTools (v1alpha1). 24 * 25 * <p> 26</p> 27 * 28 * <p> 29 * For more information about this service, see the API 30 * <a href="https://developers.google.com/fact-check/tools/api/" target="_blank">Documentation</a> 31 * </p> 32 * 33 * @author Google, Inc. 34 */ 35class FactCheckTools extends \Google\Service 36{ 37 /** See your primary Google Account email address. */ 38 const USERINFO_EMAIL = 39 "https://www.googleapis.com/auth/userinfo.email"; 40 41 public $claims; 42 public $pages; 43 44 /** 45 * Constructs the internal representation of the FactCheckTools service. 46 * 47 * @param Client|array $clientOrConfig The client used to deliver requests, or a 48 * config array to pass to a new Client instance. 49 * @param string $rootUrl The root URL used for requests to the service. 50 */ 51 public function __construct($clientOrConfig = [], $rootUrl = null) 52 { 53 parent::__construct($clientOrConfig); 54 $this->rootUrl = $rootUrl ?: 'https://factchecktools.googleapis.com/'; 55 $this->servicePath = ''; 56 $this->batchPath = 'batch'; 57 $this->version = 'v1alpha1'; 58 $this->serviceName = 'factchecktools'; 59 60 $this->claims = new FactCheckTools\Resource\Claims( 61 $this, 62 $this->serviceName, 63 'claims', 64 [ 65 'methods' => [ 66 'search' => [ 67 'path' => 'v1alpha1/claims:search', 68 'httpMethod' => 'GET', 69 'parameters' => [ 70 'languageCode' => [ 71 'location' => 'query', 72 'type' => 'string', 73 ], 74 'maxAgeDays' => [ 75 'location' => 'query', 76 'type' => 'integer', 77 ], 78 'offset' => [ 79 'location' => 'query', 80 'type' => 'integer', 81 ], 82 'pageSize' => [ 83 'location' => 'query', 84 'type' => 'integer', 85 ], 86 'pageToken' => [ 87 'location' => 'query', 88 'type' => 'string', 89 ], 90 'query' => [ 91 'location' => 'query', 92 'type' => 'string', 93 ], 94 'reviewPublisherSiteFilter' => [ 95 'location' => 'query', 96 'type' => 'string', 97 ], 98 ], 99 ], 100 ] 101 ] 102 ); 103 $this->pages = new FactCheckTools\Resource\Pages( 104 $this, 105 $this->serviceName, 106 'pages', 107 [ 108 'methods' => [ 109 'create' => [ 110 'path' => 'v1alpha1/pages', 111 'httpMethod' => 'POST', 112 'parameters' => [], 113 ],'delete' => [ 114 'path' => 'v1alpha1/{+name}', 115 'httpMethod' => 'DELETE', 116 'parameters' => [ 117 'name' => [ 118 'location' => 'path', 119 'type' => 'string', 120 'required' => true, 121 ], 122 ], 123 ],'get' => [ 124 'path' => 'v1alpha1/{+name}', 125 'httpMethod' => 'GET', 126 'parameters' => [ 127 'name' => [ 128 'location' => 'path', 129 'type' => 'string', 130 'required' => true, 131 ], 132 ], 133 ],'list' => [ 134 'path' => 'v1alpha1/pages', 135 'httpMethod' => 'GET', 136 'parameters' => [ 137 'offset' => [ 138 'location' => 'query', 139 'type' => 'integer', 140 ], 141 'organization' => [ 142 'location' => 'query', 143 'type' => 'string', 144 ], 145 'pageSize' => [ 146 'location' => 'query', 147 'type' => 'integer', 148 ], 149 'pageToken' => [ 150 'location' => 'query', 151 'type' => 'string', 152 ], 153 'url' => [ 154 'location' => 'query', 155 'type' => 'string', 156 ], 157 ], 158 ],'update' => [ 159 'path' => 'v1alpha1/{+name}', 160 'httpMethod' => 'PUT', 161 'parameters' => [ 162 'name' => [ 163 'location' => 'path', 164 'type' => 'string', 165 'required' => true, 166 ], 167 ], 168 ], 169 ] 170 ] 171 ); 172 } 173} 174 175// Adding a class alias for backwards compatibility with the previous class name. 176class_alias(FactCheckTools::class, 'Google_Service_FactCheckTools'); 177