Class Client

Represents a client for accessing the API.

Hierarchy

  • Client

Constructors

  • Creates an instance of Client.

    Example

    Basis example with API key

    const client = new Client("mySecretKey");
    

    Example

    Example with API key & redis connect details

    const client = new Client("mySecretKey", {
    redis: {
    url: "redis://host:port",
    password: "mySecretPassword",
    expire: {
    media: 60 // cached media entries expire after x seconds
    }
    }
    });

    Parameters

    • Optional apiKey: string

      The API key used for authentication.

    • Optional clientSettings: ClientSettings

      The settings object for the client.

    Returns Client

Properties

_apiKey?: string

The API key used for authentication.

characters: CharactersSearch

The characters search object for searching for characters.

fetcher: Fetcher

The fetcher object used for making API requests.

The media search object for searching for media.

redis?: RedisClientType<{} & RedisModules, RedisFunctions, RedisScripts>

The Redis client object used for caching.

settings: ClientSettings

The settings object for the client.

The media search object for searching for users.

Generated using TypeDoc