1 | import { GlobalOptions } from './api';
|
2 | import { Endpoint } from './endpoint';
|
3 | export type EndpointCreator = (options: GlobalOptions, google: {}) => Endpoint;
|
4 | export interface DiscoveryOptions {
|
5 | includePrivate?: boolean;
|
6 | debug?: boolean;
|
7 | }
|
8 | export declare class Discovery {
|
9 | private transporter;
|
10 | private options;
|
11 | |
12 |
|
13 |
|
14 |
|
15 |
|
16 | constructor(options: DiscoveryOptions);
|
17 | /**
|
18 | * Generate and Endpoint from an endpoint schema object.
|
19 | *
|
20 | * @param schema The schema from which to generate the Endpoint.
|
21 | * @return A function that creates an endpoint.
|
22 | */
|
23 | private makeEndpoint;
|
24 | /**
|
25 | * Log output of generator. Works just like console.log
|
26 | */
|
27 | private log;
|
28 | /**
|
29 | * Generate all APIs and return as in-memory object.
|
30 | * @param discoveryUrl
|
31 | */
|
32 | discoverAllAPIs(discoveryUrl: string): Promise<{}>;
|
33 | |
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 | discoverAPI(apiDiscoveryUrl: string | {
|
40 | url?: string;
|
41 | }): Promise<EndpointCreator>;
|
42 | }
|