Skip to main content
Latest
class AuthleteApiFactory
import { AuthleteApiFactory } from "https://deno.land/x/authlete_deno@v1.2.10/mod.ts";

The factory to create an AuthleteApi instance.

Static Properties

private
defaultApiPromise: Promise<AuthleteApi> | null

The promise object for creating the default AuthleteApi instance.

Static Methods

private
createDefaultApi(): Promise<AuthleteApi>
create(config: AuthleteConfiguration, implInfo?: ImplInfo): Promise<AuthleteApi>

Create an instance of a class that implements AuthleteApi interface with configuration.

Get a promise object that returns the default AuthleteApi instance.

When this method is first called, it creates a promise object that loads configuration information from a property file named authlete.json (, which must be located directly under the execution directory) and creates an instance of the standard implementation class of AuthleteApi interface with the configuration. And then, the promise object is cached in this class. This means that subsequent calls to this method return the cached promise object.