Constructor Summary
Public Constructor | ||
public |
constructor(options: {endPoint: string, apiToken: string, agent: ?http.Agent, authHeaderName: ?string}) |
Member Summary
Private Members | ||
private |
fetchJson_(path: string, body: Object=, options: Object=): Promise<Response>: * |
Method Summary
Public Methods | ||
public |
getDataSource(id: number): Promise<DataSource> |
|
public |
getDataSources(): Promise<Array<DataSource>> |
|
public |
|
|
public |
getQueries(): Promise<{count: number, page: number, page_size: number, results: Array<Query>}>{count:> |
|
public |
|
|
public |
getQueryResult(queryResultId: number): Promise<{query_result: QueryResult}>{query_result:> |
|
public |
postQuery(query: {query: string, data_source_id: number, name: string, description: string}): Promise<Query> |
|
public |
postQueryResult(query: {data_source_id: number, max_age: number, query: string, query_id: number}): Promise<{job: Job}|{query_result: QueryResult}>{job:> |
|
public |
async queryAndWaitResult(query: {data_source_id: number, query: string, query_id: number}, timeout: number=): Promise<{query_result: QueryResult}>{query_result:> |
|
public |
updateQuery(query: {id: number, query: string, data_source_id: number, name: string, description: string}): Promise<Query> |
Private Methods | ||
private |
|
|
private |
|
Public Constructors
Private Members
Public Methods
public getDataSource(id: number): Promise<DataSource> source
Params:
Name | Type | Attribute | Description |
id | number |
public getJob(id: number): Promise<{job: Job}>{job:> source
Params:
Name | Type | Attribute | Description |
id | number |
Test:
public getQueries(): Promise<{count: number, page: number, page_size: number, results: Array<Query>}>{count:> source
public getQueryResult(queryResultId: number): Promise<{query_result: QueryResult}>{query_result:> source
Params:
Name | Type | Attribute | Description |
queryResultId | number |