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

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

Issue 2936613002: Api-Roll 50: 2017-06-12 (Closed)
Patch Set: Created 3 years, 6 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
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 * [prefix] - Enables prefix match against names and aliases of entities
43 *
44 * [query] - The literal query string for search.
45 *
46 * [types] - Restricts returned entities with these types, e.g. Person 42 * [types] - Restricts returned entities with these types, e.g. Person
47 * (as defined in http://schema.org/Person). If multiple types are specified, 43 * (as defined in http://schema.org/Person). If multiple types are specified,
48 * returned entities will contain one or more of these types. 44 * returned entities will contain one or more of these types.
49 * 45 *
50 * [indent] - Enables indenting of json results. 46 * [indent] - Enables indenting of json results.
51 * 47 *
52 * [languages] - The list of language codes (defined in ISO 693) to run the 48 * [languages] - The list of language codes (defined in ISO 693) to run the
53 * query with, 49 * query with,
54 * e.g. 'en'. 50 * e.g. 'en'.
55 * 51 *
56 * [ids] - The list of entity id to be used for search instead of query 52 * [ids] - The list of entity id to be used for search instead of query
57 * string. 53 * string.
58 * To specify multiple ids in the HTTP request, repeat the parameter in the 54 * To specify multiple ids in the HTTP request, repeat the parameter in the
59 * URL as in ...?ids=A&ids=B 55 * URL as in ...?ids=A&ids=B
60 * 56 *
61 * [limit] - Limits the number of entities to be returned. 57 * [limit] - Limits the number of entities to be returned.
62 * 58 *
59 * [prefix] - Enables prefix match against names and aliases of entities
60 *
61 * [query] - The literal query string for search.
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.bool prefix, core.String query, core .List<core.String> types, core.bool indent, core.List<core.String> languages, co re.List<core.String> ids, core.int limit}) { 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}) {
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 (prefix != null) {
80 _queryParams["prefix"] = ["${prefix}"];
81 }
82 if (query != null) {
83 _queryParams["query"] = [query];
84 }
85 if (types != null) { 79 if (types != null) {
86 _queryParams["types"] = types; 80 _queryParams["types"] = types;
87 } 81 }
88 if (indent != null) { 82 if (indent != null) {
89 _queryParams["indent"] = ["${indent}"]; 83 _queryParams["indent"] = ["${indent}"];
90 } 84 }
91 if (languages != null) { 85 if (languages != null) {
92 _queryParams["languages"] = languages; 86 _queryParams["languages"] = languages;
93 } 87 }
94 if (ids != null) { 88 if (ids != null) {
95 _queryParams["ids"] = ids; 89 _queryParams["ids"] = ids;
96 } 90 }
97 if (limit != null) { 91 if (limit != null) {
98 _queryParams["limit"] = ["${limit}"]; 92 _queryParams["limit"] = ["${limit}"];
99 } 93 }
94 if (prefix != null) {
95 _queryParams["prefix"] = ["${prefix}"];
96 }
97 if (query != null) {
98 _queryParams["query"] = [query];
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 P_context = _json["@context"]; 149 P_context = _json["@context"];
150 } 150 }
151 if (_json.containsKey("@type")) { 151 if (_json.containsKey("@type")) {
152 P_type = _json["@type"]; 152 P_type = _json["@type"];
153 } 153 }
154 if (_json.containsKey("itemListElement")) { 154 if (_json.containsKey("itemListElement")) {
155 itemListElement = _json["itemListElement"]; 155 itemListElement = _json["itemListElement"];
156 } 156 }
157 } 157 }
158 158
159 core.Map toJson() { 159 core.Map<core.String, core.Object> toJson() {
160 var _json = new core.Map(); 160 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
161 if (P_context != null) { 161 if (P_context != null) {
162 _json["@context"] = P_context; 162 _json["@context"] = P_context;
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/identitytoolkit/v3.dart ('k') | generated/googleapis/lib/language/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698