UNPKG

@dasch-swiss/dsp-js

Version:

JavaScript library that handles API requests to Knora

31 lines (30 loc) 1.05 kB
/** * Configuration to instantiate a `KnoraApiConnection`. * * @category Config */ 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 */ get apiUrl(): string; /** * @param apiProtocol the protocol of the API (http or https) * @param apiHost the DSP-API base URL * @param apiPort the port of DSP-API * @param apiPath the base path following host and port, if any. * @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); }