Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: generated/googleapis/lib/kgsearch/v1.dart

Issue 2973303002: Api-Roll 51: 2017-07-10 (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « generated/googleapis/lib/iam/v1.dart ('k') | generated/googleapis/lib/logging/v2.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // This is a generated file (see the discoveryapis_generator project). 1 // This is a generated file (see the discoveryapis_generator project).
2 2
3 library googleapis.kgsearch.v1; 3 library googleapis.kgsearch.v1;
4 4
5 import 'dart:core' as core; 5 import 'dart:core' as core;
6 import 'dart:async' as async; 6 import 'dart:async' as async;
7 import 'dart:convert' as convert; 7 import 'dart:convert' as convert;
8 8
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
10 import 'package:http/http.dart' as http; 10 import 'package:http/http.dart' as http;
(...skipping 21 matching lines...) Expand all
32 EntitiesResourceApi(commons.ApiRequester client) : 32 EntitiesResourceApi(commons.ApiRequester client) :
33 _requester = client; 33 _requester = client;
34 34
35 /** 35 /**
36 * Searches Knowledge Graph for entities that match the constraints. 36 * Searches Knowledge Graph for entities that match the constraints.
37 * A list of matched entities will be returned in response, which will be in 37 * A list of matched entities will be returned in response, which will be in
38 * JSON-LD format and compatible with http://schema.org 38 * JSON-LD format and compatible with http://schema.org
39 * 39 *
40 * Request parameters: 40 * Request parameters:
41 * 41 *
42 * [types] - Restricts returned entities with these types, e.g. Person
43 * (as defined in http://schema.org/Person). If multiple types are specified,
44 * returned entities will contain one or more of these types.
45 *
46 * [indent] - Enables indenting of json results.
47 *
48 * [languages] - The list of language codes (defined in ISO 693) to run the
49 * query with,
50 * e.g. 'en'.
51 *
52 * [ids] - The list of entity id to be used for search instead of query 42 * [ids] - The list of entity id to be used for search instead of query
53 * string. 43 * string.
54 * To specify multiple ids in the HTTP request, repeat the parameter in the 44 * To specify multiple ids in the HTTP request, repeat the parameter in the
55 * URL as in ...?ids=A&ids=B 45 * URL as in ...?ids=A&ids=B
56 * 46 *
57 * [limit] - Limits the number of entities to be returned. 47 * [limit] - Limits the number of entities to be returned.
58 * 48 *
59 * [prefix] - Enables prefix match against names and aliases of entities 49 * [prefix] - Enables prefix match against names and aliases of entities
60 * 50 *
61 * [query] - The literal query string for search. 51 * [query] - The literal query string for search.
62 * 52 *
53 * [types] - Restricts returned entities with these types, e.g. Person
54 * (as defined in http://schema.org/Person). If multiple types are specified,
55 * returned entities will contain one or more of these types.
56 *
57 * [indent] - Enables indenting of json results.
58 *
59 * [languages] - The list of language codes (defined in ISO 693) to run the
60 * query with,
61 * e.g. 'en'.
62 *
63 * Completes with a [SearchResponse]. 63 * Completes with a [SearchResponse].
64 * 64 *
65 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 65 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
66 * error. 66 * error.
67 * 67 *
68 * If the used [http.Client] completes with an error when making a REST call, 68 * If the used [http.Client] completes with an error when making a REST call,
69 * this method will complete with the same error. 69 * this method will complete with the same error.
70 */ 70 */
71 async.Future<SearchResponse> search({core.List<core.String> types, core.bool i ndent, core.List<core.String> languages, core.List<core.String> ids, core.int li mit, core.bool prefix, core.String query}) { 71 async.Future<SearchResponse> search({core.List<core.String> ids, core.int limi t, core.bool prefix, core.String query, core.List<core.String> types, core.bool indent, core.List<core.String> languages}) {
72 var _url = null; 72 var _url = null;
73 var _queryParams = new core.Map(); 73 var _queryParams = new core.Map();
74 var _uploadMedia = null; 74 var _uploadMedia = null;
75 var _uploadOptions = null; 75 var _uploadOptions = null;
76 var _downloadOptions = commons.DownloadOptions.Metadata; 76 var _downloadOptions = commons.DownloadOptions.Metadata;
77 var _body = null; 77 var _body = null;
78 78
79 if (types != null) {
80 _queryParams["types"] = types;
81 }
82 if (indent != null) {
83 _queryParams["indent"] = ["${indent}"];
84 }
85 if (languages != null) {
86 _queryParams["languages"] = languages;
87 }
88 if (ids != null) { 79 if (ids != null) {
89 _queryParams["ids"] = ids; 80 _queryParams["ids"] = ids;
90 } 81 }
91 if (limit != null) { 82 if (limit != null) {
92 _queryParams["limit"] = ["${limit}"]; 83 _queryParams["limit"] = ["${limit}"];
93 } 84 }
94 if (prefix != null) { 85 if (prefix != null) {
95 _queryParams["prefix"] = ["${prefix}"]; 86 _queryParams["prefix"] = ["${prefix}"];
96 } 87 }
97 if (query != null) { 88 if (query != null) {
98 _queryParams["query"] = [query]; 89 _queryParams["query"] = [query];
99 } 90 }
91 if (types != null) {
92 _queryParams["types"] = types;
93 }
94 if (indent != null) {
95 _queryParams["indent"] = ["${indent}"];
96 }
97 if (languages != null) {
98 _queryParams["languages"] = languages;
99 }
100 100
101 _url = 'v1/entities:search'; 101 _url = 'v1/entities:search';
102 102
103 var _response = _requester.request(_url, 103 var _response = _requester.request(_url,
104 "GET", 104 "GET",
105 body: _body, 105 body: _body,
106 queryParams: _queryParams, 106 queryParams: _queryParams,
107 uploadOptions: _uploadOptions, 107 uploadOptions: _uploadOptions,
108 uploadMedia: _uploadMedia, 108 uploadMedia: _uploadMedia,
109 downloadOptions: _downloadOptions); 109 downloadOptions: _downloadOptions);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 163 }
164 if (P_type != null) { 164 if (P_type != null) {
165 _json["@type"] = P_type; 165 _json["@type"] = P_type;
166 } 166 }
167 if (itemListElement != null) { 167 if (itemListElement != null) {
168 _json["itemListElement"] = itemListElement; 168 _json["itemListElement"] = itemListElement;
169 } 169 }
170 return _json; 170 return _json;
171 } 171 }
172 } 172 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/iam/v1.dart ('k') | generated/googleapis/lib/logging/v2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698