Send queries to the Spinque Query API using fetch.

Hierarchy

  • Api

Constructors

Properties

_authentication?: ApiAuthenticationConfig
_authenticator?: Authenticator
_isInitialized: Promise<boolean>
api?: string

Name of the API that is provided by the workspace. The Spinque Desk administrator working on your project knowns this value.

baseUrl: string = DEFAULT_BASE_URL

URL to the Spinque Query API deployment.

Default

https://rest.spinque.com/
config?: string = 'default'

Name of the configuration of the Spinque workspace that should be used. Usually, this is something like 'production', 'development' or 'default'. The Spinque Desk administrator working on your project knowns this value.

Default

default
version?: string = '4'

Version of the Spinque Query API deployment.

Default

4
workspace?: string

Name of the Spinque workspace that should be addressed. The Spinque Desk administrator working on your project knowns this value.

Accessors

  • get accessToken(): undefined | string
  • Returns undefined | string

Methods

  • Fetch a url directly, circumventing all Api configuration except authentication. Useful when wanting to tap into @spinque/query-api's authentication service while also wanting to construct your own URLs. This function does not check whether the provided URL is a valid request to Spinque, take caution.

    Type Parameters

    Parameters

    • url: string
    • requestInit: RequestInit = {}

    Returns Promise<R>

  • Handle the response of a fetch to Spinque Query API.

    Type Parameters

    Parameters

    • response: Response

    Returns Promise<R>

Generated using TypeDoc