Hierarchy (View Summary)

Constructors

Properties

apiExtra?: unknown
apiKey?: string
apiUrl: string
apiUrlPlaceholder: string = config.originPlaceholder
baseLang: string = config.baseLang
fetchOpts: Record<string, unknown>
headers: Record<string, unknown> = {}
origin: string
originPlaceholder: string = config.originPlaceholder

Methods

  • Parameters

    • body: unknown
    • headers: Record<string, string> = {}
    • method: RequestMethod = "POST"

    Returns {
        body: unknown;
        headers: { Origin: string; Referer: string };
        method: RequestMethod;
    }

  • Parameters

    • url: undefined | string

    Returns url is string

  • The standard method for requesting the API, if necessary, you can override how it is done in the example

    Type Parameters

    • T = unknown

    Parameters

    • path: string
    • body: unknown
    • headers: Record<string, string> = {}
    • method: RequestMethod = "POST"

    Returns Promise<ProviderResponse>