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

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

Issue 3006323002: Api-Roll 54: 2017-09-11 (Closed)
Patch Set: use 2.0.0-dev.infinity sdk constraint in pubspecs Created 3 years, 3 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/identitytoolkit/v3.dart ('k') | generated/googleapis/lib/language/v1.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 d01da4cf99ea127ab6571e901efe00d9e973dab5..34f305b502c99e535aa607396c3b3ab562f53d2f 100644
--- a/generated/googleapis/lib/kgsearch/v1.dart
+++ b/generated/googleapis/lib/kgsearch/v1.dart
@@ -9,66 +9,72 @@ import 'dart:convert' as convert;
import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
import 'package:http/http.dart' as http;
-export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show
- ApiRequestError, DetailedApiRequestError;
+export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
+ show ApiRequestError, DetailedApiRequestError;
const core.String USER_AGENT = 'dart-api-client kgsearch/v1';
-/** Searches the Google Knowledge Graph for entities. */
+/// Searches the Google Knowledge Graph for entities.
class KgsearchApi {
-
final commons.ApiRequester _requester;
EntitiesResourceApi get entities => new EntitiesResourceApi(_requester);
- KgsearchApi(http.Client client, {core.String rootUrl: "https://kgsearch.googleapis.com/", core.String servicePath: ""}) :
- _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
+ KgsearchApi(http.Client client,
+ {core.String rootUrl: "https://kgsearch.googleapis.com/",
+ core.String servicePath: ""})
+ : _requester =
+ new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
}
-
class EntitiesResourceApi {
final commons.ApiRequester _requester;
- EntitiesResourceApi(commons.ApiRequester client) :
- _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
- *
- * Request parameters:
- *
- * [limit] - Limits the number of entities to be returned.
- *
- * [prefix] - Enables prefix match against names and aliases of entities
- *
- * [query] - The literal query string for search.
- *
- * [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.
- *
- * [indent] - Enables indenting of json results.
- *
- * [languages] - The list of language codes (defined in ISO 693) to run the
- * query with,
- * e.g. 'en'.
- *
- * [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
- *
- * Completes with a [SearchResponse].
- *
- * Completes with a [commons.ApiRequestError] if the API endpoint returned an
- * error.
- *
- * 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.int limit, core.bool prefix, core.String query, core.List<core.String> types, core.bool indent, core.List<core.String> languages, core.List<core.String> ids}) {
+ EntitiesResourceApi(commons.ApiRequester client) : _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
+ ///
+ /// Request parameters:
+ ///
+ /// [prefix] - Enables prefix match against names and aliases of entities
+ ///
+ /// [query] - The literal query string for search.
+ ///
+ /// [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.
+ ///
+ /// [indent] - Enables indenting of json results.
+ ///
+ /// [languages] - The list of language codes (defined in ISO 693) to run the
+ /// query with,
+ /// e.g. 'en'.
+ ///
+ /// [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
+ ///
+ /// [limit] - Limits the number of entities to be returned.
+ ///
+ /// Completes with a [SearchResponse].
+ ///
+ /// Completes with a [commons.ApiRequestError] if the API endpoint returned
+ /// an error.
+ ///
+ /// 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.bool prefix,
+ core.String query,
+ core.List<core.String> types,
+ core.bool indent,
+ core.List<core.String> languages,
+ core.List<core.String> ids,
+ core.int limit}) {
var _url = null;
var _queryParams = new core.Map();
var _uploadMedia = null;
@@ -76,9 +82,6 @@ class EntitiesResourceApi {
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body = null;
- if (limit != null) {
- _queryParams["limit"] = ["${limit}"];
- }
if (prefix != null) {
_queryParams["prefix"] = ["${prefix}"];
}
@@ -97,49 +100,42 @@ class EntitiesResourceApi {
if (ids != null) {
_queryParams["ids"] = ids;
}
+ if (limit != null) {
+ _queryParams["limit"] = ["${limit}"];
+ }
_url = 'v1/entities:search';
- var _response = _requester.request(_url,
- "GET",
- body: _body,
- queryParams: _queryParams,
- uploadOptions: _uploadOptions,
- uploadMedia: _uploadMedia,
- downloadOptions: _downloadOptions);
+ var _response = _requester.request(_url, "GET",
+ body: _body,
+ queryParams: _queryParams,
+ uploadOptions: _uploadOptions,
+ uploadMedia: _uploadMedia,
+ downloadOptions: _downloadOptions);
return _response.then((data) => new SearchResponse.fromJson(data));
}
-
}
-
-
-/**
- * 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 {
- /**
- * The local context applicable for the response. See more details at
- * http://www.w3.org/TR/json-ld/#context-definitions.
- *
- * The values for Object must be JSON objects. It can consist of `num`,
- * `String`, `bool` and `null` as well as `Map` and `List` values.
- */
+ /// The local context applicable for the response. See more details at
+ /// http://www.w3.org/TR/json-ld/#context-definitions.
+ ///
+ /// 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 P_context;
- /**
- * 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.
- */
+
+ /// 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.Object P_type;
- /**
- * 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.
- */
+
+ /// 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.List<core.Object> itemListElement;
SearchResponse();
@@ -157,7 +153,8 @@ class SearchResponse {
}
core.Map<core.String, core.Object> toJson() {
- final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
+ final core.Map<core.String, core.Object> _json =
+ new core.Map<core.String, core.Object>();
if (P_context != null) {
_json["@context"] = P_context;
}
« 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