Files
DefinitelyTyped/types/gapi.client.kgsearch/index.d.ts
Alexey Bolisov 4f8a3d571b Add Google APIs typings (#19083)
* Add Google APIs typings

* [gapi.cliebt.* ] Add version as part of typings name and fix gapi.client tslint errors

* versions should not get their own folders
fixing a few typos
using /** syntax so comments show up in editors
export only actual (last) version for now

* export only actual (last) version for now

* merge namespaces and remove unnecessary namespace qualifiers

* remove namespace qualifier for gapi.client.Request from nested namespaces and change Request base interface to Promise

* disable await-promise rule

* fix collision between gapi.client.Request and Request from nested namespace
disable no-irregular-whitespace rule

* sort properties and namespace resources

* remove empty comments
sort resources amd methods in tests and readme.md

* update 'this is autogenerated file' banner to remove this text from gapi.client namespace hint
use multiline comments when comment has several lines

* implement no-trailing-whitespace, no-padding, max-line-length, await-promise, no-irregular-whitespace rules

* add strictFunctionTypes to tsconfig

* fix "Whitespace within parentheses is not allowed" rule

* fix ts-lint rules

* fixes

* remove deprecated replicapool and replicapoolupdater api

* fix no-irregular-whitespace

* fix no-irregular-whitespace
2017-10-09 14:55:04 -07:00

95 lines
4.3 KiB
TypeScript

// Type definitions for Google Knowledge Graph Search API v1 1.0
// Project: https://developers.google.com/knowledge-graph/
// Definitions by: Bolisov Alexey <https://github.com/Bolisov>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
// IMPORTANT
// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually.
// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator
// Generated from: https://kgsearch.googleapis.com/$discovery/rest?version=v1
/// <reference types="gapi.client" />
declare namespace gapi.client {
/** Load Knowledge Graph Search API v1 */
function load(name: "kgsearch", version: "v1"): PromiseLike<void>;
function load(name: "kgsearch", version: "v1", callback: () => any): void;
const entities: kgsearch.EntitiesResource;
namespace kgsearch {
interface SearchResponse {
/**
* The local context applicable for the response. See more details at
* http://www.w3.org/TR/json-ld/#context-definitions.
*/
"@context"?: any;
/** The schema type of top-level JSON-LD object, e.g. ItemList. */
"@type"?: any;
/** The item list of search results. */
itemListElement?: any[];
}
interface EntitiesResource {
/**
* 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
*/
search(request: {
/** V1 error format. */
"$.xgafv"?: string;
/** OAuth access token. */
access_token?: string;
/** Data format for response. */
alt?: string;
/** OAuth bearer token. */
bearer_token?: string;
/** JSONP */
callback?: string;
/** Selector specifying which fields to include in a partial response. */
fields?: string;
/**
* 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
*/
ids?: string;
/** Enables indenting of json results. */
indent?: boolean;
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
key?: string;
/**
* The list of language codes (defined in ISO 693) to run the query with,
* e.g. 'en'.
*/
languages?: string;
/** Limits the number of entities to be returned. */
limit?: number;
/** OAuth 2.0 token for the current user. */
oauth_token?: string;
/** Pretty-print response. */
pp?: boolean;
/** Enables prefix match against names and aliases of entities */
prefix?: boolean;
/** Returns response with indentations and line breaks. */
prettyPrint?: boolean;
/** The literal query string for search. */
query?: string;
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
quotaUser?: string;
/**
* 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.
*/
types?: string;
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
uploadType?: string;
/** Upload protocol for media (e.g. "raw", "multipart"). */
upload_protocol?: string;
}): Request<SearchResponse>;
}
}
}