jikan4.js
    Preparing search index...

    Interface ClientOptions

    interface ClientOptions {
        baseUri: string;
        dataExpiry: number;
        dataPaginationMaxSize: number;
        dataPath?: string;
        dataRateLimit: number;
        disableCaching: boolean;
        host: string;
        keepAlive: boolean;
        keepAliveMsecs: number;
        maxApiErrorRetry: number;
        requestQueueLimit: number;
        requestTimeout: number;
        retryOnApiError: boolean;
        secure: boolean;
    }
    Index

    Properties

    baseUri: string

    The base pathname of each request.

    Default value: v4

    dataExpiry: number

    The number of miliseconds before the cache is expired. This is an effort to avoid sending multiple requests for the same content to

    Default value: 86400000 (1 day)

    dataPaginationMaxSize: number

    The number of items to be returned on each paginated request.

    Default value: 25

    dataPath?: string

    Where to store cache from Jikan API

    dataRateLimit: number

    The number of miliseconds to wait before creating another request. This is to avoid getting rate-limited by

    Default value: 1200 (50 requests per minute)

    disableCaching: boolean

    Whether to disable cache or not. It's recommended that this option is disabled to avoid sending multiple requests for the same content.

    host: string

    The hostname of the server.

    This option could be useful if you are hosting your own instance of Jikan REST API.

    Default value: api.jikan.moe

    keepAlive: boolean

    Keep sockets around in a pool to be used by other requests in the future.

    Default value: true

    keepAliveMsecs: number

    When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Only relevant if keepAlive is set to true.

    Default value: 60000

    maxApiErrorRetry: number

    The number of retries on HTTP 500 errors.

    requestQueueLimit: number

    The maximum limit of requests in the queue. This is an effort to prevent clogging the queue.

    Default value: 100

    requestTimeout: number

    The number of miliseconds before giving up on a request.

    Default value: 15000 (15 seconds)

    retryOnApiError: boolean

    Whether to retry on HTTP 500 errors.

    secure: boolean

    Whether to use HTTPS protocol instead of HTTP.

    Default value: false