Options
All
  • Public
  • Public/Protected
  • All
Menu

Class KnoraApiConfig

Configuration to instantiate a KnoraApiConnection.

Hierarchy

  • KnoraApiConfig

Index

Constructors

constructor

  • new KnoraApiConfig(apiProtocol: "http" | "https", apiHost: string, apiPort?: number | null, apiPath?: string, jsonWebToken?: string, logErrors?: boolean): KnoraApiConfig
  • Parameters

    • apiProtocol: "http" | "https"

      the protocol of the API (http or https)

    • apiHost: string

      the DSP-API base URL

    • Default value apiPort: number | null = null

      the port of DSP-API

    • Default value apiPath: string = ""

      the base path following host and port, if any.

    • Default value jsonWebToken: string = ""

      token to identify the user

    • Default value logErrors: boolean = false

      determines whether errors should be logged to the console

    Returns KnoraApiConfig

Properties

apiHost

apiHost: string

the DSP-API base URL

apiPath

apiPath: string

the base path following host and port, if any.

apiPort

apiPort: number | null

the port of DSP-API

apiProtocol

apiProtocol: "http" | "https"

the protocol of the API (http or https)

jsonWebToken

jsonWebToken: string

token to identify the user

logErrors

logErrors: boolean

determines whether errors should be logged to the console

Static DEFAULT_PORT_HTTP

DEFAULT_PORT_HTTP: 80 = 80

Static DEFAULT_PORT_HTTPS

DEFAULT_PORT_HTTPS: 443 = 443

Static PROTOCOL_HTTP

PROTOCOL_HTTP: "http" = "http"

Static PROTOCOL_HTTPS

PROTOCOL_HTTPS: "https" = "https"

Accessors

apiUrl

  • get apiUrl(): string

Generated using TypeDoc