PluginProbe
Authorizer / 2.6.10
Authorizer v2.6.10
3.15.3 3.15.2 3.15.1 3.15.0 3.14.3 3.14.4 3.14.2 3.14.1 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.9.0 2.9.1 2.9.10 2.9.11 2.9.12 2.9.13 2.9.2 2.9.3 2.9.6 All 126 releases
authorizer / vendor / google-api-php-client / src / Google / Service / Freebase.php

Freebase.php in Authorizer 2.6.10, at vendor/google-api-php-client/src/Google/Service/Freebase.php

452 lines 12.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 * use this file except in compliance with the License. You may obtain a copy of
5 * the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 * License for the specific language governing permissions and limitations under
13 * the License.
14 */
15
16 /**
17 * Service definition for Freebase (v1).
18 *
19 * <p>
20 * Find Freebase entities using textual queries and other constraints.</p>
21 *
22 * <p>
23 * For more information about this service, see the API
24 * <a href="https://developers.google.com/freebase/" target="_blank">Documentation</a>
25 * </p>
26 *
27 * @author Google, Inc.
28 */
29 class Google_Service_Freebase extends Google_Service
30 {
31
32
33
34 private $base_methods;
35
36 /**
37 * Constructs the internal representation of the Freebase service.
38 *
39 * @param Google_Client $client
40 */
41 public function __construct(Google_Client $client)
42 {
43 parent::__construct($client);
44 $this->rootUrl = 'https://www.googleapis.com/';
45 $this->servicePath = 'freebase/v1/';
46 $this->version = 'v1';
47 $this->serviceName = 'freebase';
48
49 $this->base_methods = new Google_Service_Resource(
50 $this,
51 $this->serviceName,
52 '',
53 array(
54 'methods' => array(
55 'reconcile' => array(
56 'path' => 'reconcile',
57 'httpMethod' => 'GET',
58 'parameters' => array(
59 'confidence' => array(
60 'location' => 'query',
61 'type' => 'number',
62 ),
63 'kind' => array(
64 'location' => 'query',
65 'type' => 'string',
66 'repeated' => true,
67 ),
68 'lang' => array(
69 'location' => 'query',
70 'type' => 'string',
71 'repeated' => true,
72 ),
73 'limit' => array(
74 'location' => 'query',
75 'type' => 'integer',
76 ),
77 'name' => array(
78 'location' => 'query',
79 'type' => 'string',
80 ),
81 'prop' => array(
82 'location' => 'query',
83 'type' => 'string',
84 'repeated' => true,
85 ),
86 ),
87 ),'search' => array(
88 'path' => 'search',
89 'httpMethod' => 'GET',
90 'parameters' => array(
91 'as_of_time' => array(
92 'location' => 'query',
93 'type' => 'string',
94 ),
95 'callback' => array(
96 'location' => 'query',
97 'type' => 'string',
98 ),
99 'cursor' => array(
100 'location' => 'query',
101 'type' => 'integer',
102 ),
103 'domain' => array(
104 'location' => 'query',
105 'type' => 'string',
106 'repeated' => true,
107 ),
108 'encode' => array(
109 'location' => 'query',
110 'type' => 'string',
111 ),
112 'exact' => array(
113 'location' => 'query',
114 'type' => 'boolean',
115 ),
116 'filter' => array(
117 'location' => 'query',
118 'type' => 'string',
119 'repeated' => true,
120 ),
121 'format' => array(
122 'location' => 'query',
123 'type' => 'string',
124 ),
125 'help' => array(
126 'location' => 'query',
127 'type' => 'string',
128 ),
129 'indent' => array(
130 'location' => 'query',
131 'type' => 'boolean',
132 ),
133 'lang' => array(
134 'location' => 'query',
135 'type' => 'string',
136 'repeated' => true,
137 ),
138 'limit' => array(
139 'location' => 'query',
140 'type' => 'integer',
141 ),
142 'mid' => array(
143 'location' => 'query',
144 'type' => 'string',
145 'repeated' => true,
146 ),
147 'mql_output' => array(
148 'location' => 'query',
149 'type' => 'string',
150 ),
151 'output' => array(
152 'location' => 'query',
153 'type' => 'string',
154 ),
155 'prefixed' => array(
156 'location' => 'query',
157 'type' => 'boolean',
158 ),
159 'query' => array(
160 'location' => 'query',
161 'type' => 'string',
162 ),
163 'scoring' => array(
164 'location' => 'query',
165 'type' => 'string',
166 ),
167 'spell' => array(
168 'location' => 'query',
169 'type' => 'string',
170 ),
171 'stemmed' => array(
172 'location' => 'query',
173 'type' => 'boolean',
174 ),
175 'type' => array(
176 'location' => 'query',
177 'type' => 'string',
178 'repeated' => true,
179 ),
180 'with' => array(
181 'location' => 'query',
182 'type' => 'string',
183 'repeated' => true,
184 ),
185 'without' => array(
186 'location' => 'query',
187 'type' => 'string',
188 'repeated' => true,
189 ),
190 ),
191 ),
192 )
193 )
194 );
195 }
196 /**
197 * Reconcile entities to Freebase open data. (reconcile)
198 *
199 * @param array $optParams Optional parameters.
200 *
201 * @opt_param float confidence Required confidence for a candidate to match.
202 * Must be between .5 and 1.0
203 * @opt_param string kind Classifications of entity e.g. type, category, title.
204 * @opt_param string lang Languages for names and values. First language is used
205 * for display. Default is 'en'.
206 * @opt_param int limit Maximum number of candidates to return.
207 * @opt_param string name Name of entity.
208 * @opt_param string prop Property values for entity formatted as :
209 * @return Google_Service_Freebase_ReconcileGet
210 */
211 public function reconcile($optParams = array())
212 {
213 $params = array();
214 $params = array_merge($params, $optParams);
215 return $this->base_methods->call('reconcile', array($params), "Google_Service_Freebase_ReconcileGet");
216 }
217 /**
218 * Search Freebase open data. (search)
219 *
220 * @param array $optParams Optional parameters.
221 *
222 * @opt_param string as_of_time A mql as_of_time value to use with mql_output
223 * queries.
224 * @opt_param string callback JS method name for JSONP callbacks.
225 * @opt_param int cursor The cursor value to use for the next page of results.
226 * @opt_param string domain Restrict to topics with this Freebase domain id.
227 * @opt_param string encode The encoding of the response. You can use this
228 * parameter to enable html encoding.
229 * @opt_param bool exact Query on exact name and keys only.
230 * @opt_param string filter A filter to apply to the query.
231 * @opt_param string format Structural format of the json response.
232 * @opt_param string help The keyword to request help on.
233 * @opt_param bool indent Whether to indent the json results or not.
234 * @opt_param string lang The code of the language to run the query with.
235 * Default is 'en'.
236 * @opt_param int limit Maximum number of results to return.
237 * @opt_param string mid A mid to use instead of a query.
238 * @opt_param string mql_output The MQL query to run againist the results to
239 * extract more data.
240 * @opt_param string output An output expression to request data from matches.
241 * @opt_param bool prefixed Prefix match against names and aliases.
242 * @opt_param string query Query term to search for.
243 * @opt_param string scoring Relevance scoring algorithm to use.
244 * @opt_param string spell Request 'did you mean' suggestions
245 * @opt_param bool stemmed Query on stemmed names and aliases. May not be used
246 * with prefixed.
247 * @opt_param string type Restrict to topics with this Freebase type id.
248 * @opt_param string with A rule to match against.
249 * @opt_param string without A rule to not match against.
250 */
251 public function search($optParams = array())
252 {
253 $params = array();
254 $params = array_merge($params, $optParams);
255 return $this->base_methods->call('search', array($params));
256 }
257 }
258
259
260
261
262
263 class Google_Service_Freebase_ReconcileCandidate extends Google_Model
264 {
265 protected $internal_gapi_mappings = array(
266 );
267 public $confidence;
268 public $lang;
269 public $mid;
270 public $name;
271 protected $notableType = 'Google_Service_Freebase_ReconcileCandidateNotable';
272 protected $notableDataType = '';
273
274
275 public function setConfidence($confidence)
276 {
277 $this->confidence = $confidence;
278 }
279 public function getConfidence()
280 {
281 return $this->confidence;
282 }
283 public function setLang($lang)
284 {
285 $this->lang = $lang;
286 }
287 public function getLang()
288 {
289 return $this->lang;
290 }
291 public function setMid($mid)
292 {
293 $this->mid = $mid;
294 }
295 public function getMid()
296 {
297 return $this->mid;
298 }
299 public function setName($name)
300 {
301 $this->name = $name;
302 }
303 public function getName()
304 {
305 return $this->name;
306 }
307 public function setNotable(Google_Service_Freebase_ReconcileCandidateNotable $notable)
308 {
309 $this->notable = $notable;
310 }
311 public function getNotable()
312 {
313 return $this->notable;
314 }
315 }
316
317 class Google_Service_Freebase_ReconcileCandidateNotable extends Google_Model
318 {
319 protected $internal_gapi_mappings = array(
320 );
321 public $id;
322 public $name;
323
324
325 public function setId($id)
326 {
327 $this->id = $id;
328 }
329 public function getId()
330 {
331 return $this->id;
332 }
333 public function setName($name)
334 {
335 $this->name = $name;
336 }
337 public function getName()
338 {
339 return $this->name;
340 }
341 }
342
343 class Google_Service_Freebase_ReconcileGet extends Google_Collection
344 {
345 protected $collection_key = 'warning';
346 protected $internal_gapi_mappings = array(
347 );
348 protected $candidateType = 'Google_Service_Freebase_ReconcileCandidate';
349 protected $candidateDataType = 'array';
350 protected $costsType = 'Google_Service_Freebase_ReconcileGetCosts';
351 protected $costsDataType = '';
352 protected $matchType = 'Google_Service_Freebase_ReconcileCandidate';
353 protected $matchDataType = '';
354 protected $warningType = 'Google_Service_Freebase_ReconcileGetWarning';
355 protected $warningDataType = 'array';
356
357
358 public function setCandidate($candidate)
359 {
360 $this->candidate = $candidate;
361 }
362 public function getCandidate()
363 {
364 return $this->candidate;
365 }
366 public function setCosts(Google_Service_Freebase_ReconcileGetCosts $costs)
367 {
368 $this->costs = $costs;
369 }
370 public function getCosts()
371 {
372 return $this->costs;
373 }
374 public function setMatch(Google_Service_Freebase_ReconcileCandidate $match)
375 {
376 $this->match = $match;
377 }
378 public function getMatch()
379 {
380 return $this->match;
381 }
382 public function setWarning($warning)
383 {
384 $this->warning = $warning;
385 }
386 public function getWarning()
387 {
388 return $this->warning;
389 }
390 }
391
392 class Google_Service_Freebase_ReconcileGetCosts extends Google_Model
393 {
394 protected $internal_gapi_mappings = array(
395 );
396 public $hits;
397 public $ms;
398
399
400 public function setHits($hits)
401 {
402 $this->hits = $hits;
403 }
404 public function getHits()
405 {
406 return $this->hits;
407 }
408 public function setMs($ms)
409 {
410 $this->ms = $ms;
411 }
412 public function getMs()
413 {
414 return $this->ms;
415 }
416 }
417
418 class Google_Service_Freebase_ReconcileGetWarning extends Google_Model
419 {
420 protected $internal_gapi_mappings = array(
421 );
422 public $location;
423 public $message;
424 public $reason;
425
426
427 public function setLocation($location)
428 {
429 $this->location = $location;
430 }
431 public function getLocation()
432 {
433 return $this->location;
434 }
435 public function setMessage($message)
436 {
437 $this->message = $message;
438 }
439 public function getMessage()
440 {
441 return $this->message;
442 }
443 public function setReason($reason)
444 {
445 $this->reason = $reason;
446 }
447 public function getReason()
448 {
449 return $this->reason;
450 }
451 }
452