@knora/api
Version:
JavaScript library that handles API requests to Knora
30 lines (29 loc) • 1.05 kB
TypeScript
/**
* Contains the configuration that can be used in the KnoraApiConnection.
*/
export declare class KnoraApiConfig {
apiProtocol: "http" | "https";
apiHost: string;
apiPort: number | null;
apiPath: string;
jsonWebToken: string;
logErrors: boolean;
static readonly PROTOCOL_HTTP = "http";
static readonly PROTOCOL_HTTPS = "https";
static readonly DEFAULT_PORT_HTTP = 80;
static readonly DEFAULT_PORT_HTTPS = 443;
/**
* The full API URL
*/
readonly apiUrl: string;
/**
* Constructor.
* @param apiProtocol the protocol of the API (http/https)
* @param apiHost the API base URL
* @param apiPort the port of the Knora API
* @param apiPath the base path following
* @param jsonWebToken token to identify the user
* @param logErrors determines whether errors should be logged to the console
*/
constructor(apiProtocol: "http" | "https", apiHost: string, apiPort?: number | null, apiPath?: string, jsonWebToken?: string, logErrors?: boolean);
}