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

Unified Diff: generated/googleapis/lib/kgsearch/v1.dart

Issue 2649893002: Api-roll 44: 2017-01-23 (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « generated/googleapis/lib/drive/v3.dart ('k') | generated/googleapis/lib/logging/v2.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: generated/googleapis/lib/kgsearch/v1.dart
diff --git a/generated/googleapis/lib/kgsearch/v1.dart b/generated/googleapis/lib/kgsearch/v1.dart
index b95bdcfe42436a06844ec1c5675de58b62730e04..46e94920b708e6a754e713f6a4e63d84e0199628 100644
--- a/generated/googleapis/lib/kgsearch/v1.dart
+++ b/generated/googleapis/lib/kgsearch/v1.dart
@@ -14,10 +14,7 @@ export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show
const core.String USER_AGENT = 'dart-api-client kgsearch/v1';
-/**
- * Knowledge Graph Search API allows developers to search the Google Knowledge
- * Graph for entities.
- */
+/** Searches the Google Knowledge Graph for entities. */
class KgsearchApi {
final commons.ApiRequester _requester;
@@ -36,28 +33,32 @@ class EntitiesResourceApi {
_requester = client;
/**
- * Searches Knowledge Graph for entities that match the constraints. A list of
- * matched entities will be returned in response, which will be in JSON-LD
- * format and compatible with http://schema.org
+ * Searches Knowledge Graph for entities that match the constraints.
+ * A list of matched entities will be returned in response, which will be in
+ * JSON-LD format and compatible with http://schema.org
*
* Request parameters:
*
- * [query] - The literal query string for search.
+ * [limit] - Limits the number of entities to be returned.
*
* [ids] - The list of entity id to be used for search instead of query
* string.
+ * To specify multiple ids in the HTTP request, repeat the parameter in the
+ * URL as in ...?ids=A&ids=B
*
- * [languages] - The list of language codes (defined in ISO 693) to run the
- * query with, e.g. 'en'.
+ * [prefix] - Enables prefix match against names and aliases of entities
*
- * [types] - Restricts returned entities with these types, e.g. Person (as
- * defined in http://schema.org/Person).
+ * [query] - The literal query string for search.
*
* [indent] - Enables indenting of json results.
*
- * [prefix] - Enables prefix match against names and aliases of entities
+ * [types] - Restricts returned entities with these types, e.g. Person
+ * (as defined in http://schema.org/Person). If multiple types are specified,
+ * returned entities will contain one or more of these types.
*
- * [limit] - Limits the number of entities to be returned.
+ * [languages] - The list of language codes (defined in ISO 693) to run the
+ * query with,
+ * e.g. 'en'.
*
* Completes with a [SearchResponse].
*
@@ -67,7 +68,7 @@ class EntitiesResourceApi {
* If the used [http.Client] completes with an error when making a REST call,
* this method will complete with the same error.
*/
- async.Future<SearchResponse> search({core.String query, core.List<core.String> ids, core.List<core.String> languages, core.List<core.String> types, core.bool indent, core.bool prefix, core.int limit}) {
+ async.Future<SearchResponse> search({core.int limit, core.List<core.String> ids, core.bool prefix, core.String query, core.bool indent, core.List<core.String> types, core.List<core.String> languages}) {
var _url = null;
var _queryParams = new core.Map();
var _uploadMedia = null;
@@ -75,26 +76,26 @@ class EntitiesResourceApi {
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body = null;
- if (query != null) {
- _queryParams["query"] = [query];
+ if (limit != null) {
+ _queryParams["limit"] = ["${limit}"];
}
if (ids != null) {
_queryParams["ids"] = ids;
}
- if (languages != null) {
- _queryParams["languages"] = languages;
+ if (prefix != null) {
+ _queryParams["prefix"] = ["${prefix}"];
}
- if (types != null) {
- _queryParams["types"] = types;
+ if (query != null) {
+ _queryParams["query"] = [query];
}
if (indent != null) {
_queryParams["indent"] = ["${indent}"];
}
- if (prefix != null) {
- _queryParams["prefix"] = ["${prefix}"];
+ if (types != null) {
+ _queryParams["types"] = types;
}
- if (limit != null) {
- _queryParams["limit"] = ["${limit}"];
+ if (languages != null) {
+ _queryParams["languages"] = languages;
}
_url = 'v1/entities:search';
@@ -114,8 +115,8 @@ class EntitiesResourceApi {
/**
- * Response message includes the context and a list of matching results which
- * contain the detail of associated entities.
+ * Response message includes the context and a list of matching results
+ * which contain the detail of associated entities.
*/
class SearchResponse {
/**
@@ -125,47 +126,47 @@ class SearchResponse {
* The values for Object must be JSON objects. It can consist of `num`,
* `String`, `bool` and `null` as well as `Map` and `List` values.
*/
- core.Object context;
+ core.Object P_context;
/**
- * The item list of search results.
+ * The schema type of top-level JSON-LD object, e.g. ItemList.
*
* The values for Object must be JSON objects. It can consist of `num`,
* `String`, `bool` and `null` as well as `Map` and `List` values.
*/
- core.List<core.Object> itemListElement;
+ core.Object P_type;
/**
- * The schema type of top-level JSON-LD object, e.g. ItemList.
+ * The item list of search results.
*
* The values for Object must be JSON objects. It can consist of `num`,
* `String`, `bool` and `null` as well as `Map` and `List` values.
*/
- core.Object type;
+ core.List<core.Object> itemListElement;
SearchResponse();
SearchResponse.fromJson(core.Map _json) {
- if (_json.containsKey("context")) {
- context = _json["context"];
+ if (_json.containsKey("@context")) {
+ P_context = _json["@context"];
+ }
+ if (_json.containsKey("@type")) {
+ P_type = _json["@type"];
}
if (_json.containsKey("itemListElement")) {
itemListElement = _json["itemListElement"];
}
- if (_json.containsKey("type")) {
- type = _json["type"];
- }
}
core.Map toJson() {
var _json = new core.Map();
- if (context != null) {
- _json["context"] = context;
+ if (P_context != null) {
+ _json["@context"] = P_context;
+ }
+ if (P_type != null) {
+ _json["@type"] = P_type;
}
if (itemListElement != null) {
_json["itemListElement"] = itemListElement;
}
- if (type != null) {
- _json["type"] = type;
- }
return _json;
}
}
« no previous file with comments | « generated/googleapis/lib/drive/v3.dart ('k') | generated/googleapis/lib/logging/v2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698