mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 12:56:46 +08:00
* 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
98 lines
4.3 KiB
TypeScript
98 lines
4.3 KiB
TypeScript
// Type definitions for Google Accelerated Mobile Pages (AMP) URL API v1 1.0
|
|
// Project: https://developers.google.com/amp/cache/
|
|
// 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://acceleratedmobilepageurl.googleapis.com/$discovery/rest?version=v1
|
|
|
|
/// <reference types="gapi.client" />
|
|
|
|
declare namespace gapi.client {
|
|
/** Load Accelerated Mobile Pages (AMP) URL API v1 */
|
|
function load(name: "acceleratedmobilepageurl", version: "v1"): PromiseLike<void>;
|
|
function load(name: "acceleratedmobilepageurl", version: "v1", callback: () => any): void;
|
|
|
|
const ampUrls: acceleratedmobilepageurl.AmpUrlsResource;
|
|
|
|
namespace acceleratedmobilepageurl {
|
|
interface AmpUrl {
|
|
/** The AMP URL pointing to the publisher's web server. */
|
|
ampUrl?: string;
|
|
/**
|
|
* The [AMP Cache URL](/amp/cache/overview#amp-cache-url-format) pointing to
|
|
* the cached document in the Google AMP Cache.
|
|
*/
|
|
cdnAmpUrl?: string;
|
|
/** The original non-AMP URL. */
|
|
originalUrl?: string;
|
|
}
|
|
interface AmpUrlError {
|
|
/** The error code of an API call. */
|
|
errorCode?: string;
|
|
/** An optional descriptive error message. */
|
|
errorMessage?: string;
|
|
/** The original non-AMP URL. */
|
|
originalUrl?: string;
|
|
}
|
|
interface BatchGetAmpUrlsRequest {
|
|
/** The lookup_strategy being requested. */
|
|
lookupStrategy?: string;
|
|
/**
|
|
* List of URLs to look up for the paired AMP URLs.
|
|
* The URLs are case-sensitive. Up to 50 URLs per lookup
|
|
* (see [Usage Limits](/amp/cache/reference/limits)).
|
|
*/
|
|
urls?: string[];
|
|
}
|
|
interface BatchGetAmpUrlsResponse {
|
|
/**
|
|
* For each URL in BatchAmpUrlsRequest, the URL response. The response might
|
|
* not be in the same order as URLs in the batch request.
|
|
* If BatchAmpUrlsRequest contains duplicate URLs, AmpUrl is generated
|
|
* only once.
|
|
*/
|
|
ampUrls?: AmpUrl[];
|
|
/** The errors for requested URLs that have no AMP URL. */
|
|
urlErrors?: AmpUrlError[];
|
|
}
|
|
interface AmpUrlsResource {
|
|
/**
|
|
* Returns AMP URL(s) and equivalent
|
|
* [AMP Cache URL(s)](/amp/cache/overview#amp-cache-url-format).
|
|
*/
|
|
batchGet(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;
|
|
/** 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;
|
|
/** OAuth 2.0 token for the current user. */
|
|
oauth_token?: string;
|
|
/** Pretty-print response. */
|
|
pp?: boolean;
|
|
/** Returns response with indentations and line breaks. */
|
|
prettyPrint?: boolean;
|
|
/** 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;
|
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
uploadType?: string;
|
|
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
upload_protocol?: string;
|
|
}): Request<BatchGetAmpUrlsResponse>;
|
|
}
|
|
}
|
|
}
|