vk-io
    Preparing search index...

    Interface IAPIOptions

    interface IAPIOptions {
        agent: Agent;
        apiBaseUrl: string;
        apiExecuteCount: number;
        apiExecuteMethods: string[];
        apiExecuteUnsupportedMethods: string[];
        apiHeaders: Record<string, string>;
        apiLimit: number;
        apiMode: "sequential" | "parallel" | "parallel_selected";
        apiRequestMode: "sequential" | "burst";
        apiRetryLimit: number;
        apiTimeout: number;
        apiVersion: string;
        apiWait: number;
        callbackService?: CallbackService;
        language?: "ru" | "be" | "en" | "es" | "fi" | "de" | "it" | "uk";
        token: string;
    }
    Index

    Properties

    agent: Agent

    HTTPS agent

    apiBaseUrl: string

    Base API URL

    https://api.vk.ru/method

    apiExecuteCount: number

    Number of requests per execute

    25

    apiExecuteMethods: string[]

    Methods for call execute (apiMode=parallel_selected)

    ['messages.send']

    apiExecuteUnsupportedMethods: string[]

    Methods that are not supported in execute (apiMode=parallel & apiMode=parallel_selected)

    Basically it's upload methods

    [
    'photos.save',
    'photos.saveWallPhoto',
    'photos.saveOwnerPhoto',
    'photos.saveMessagesPhoto',
    'messages.setChatPhoto',
    'photos.saveMarketPhoto',
    'photos.saveMarketAlbumPhoto',
    'audio.save',
    'docs.save',
    'photos.saveOwnerCoverPhoto',
    'stories.save',
    'polls.savePhoto'
    ]
    apiHeaders: Record<string, string>

    Headers sent to the API

    { User-Agent': 'vk-io/${version} (+https://github.com/negezor/vk-io)' }

    apiLimit: number

    Requests per second

    3

    apiMode: "sequential" | "parallel" | "parallel_selected"

    Determines how requests will be collected

    • sequential - in order
    • parallel - all requests are sent through execute
    • parallel_selected - only the specified methods in apiExecuteMethods are collected in execute, other methods as in sequential mode

    sequential

    apiRequestMode: "sequential" | "burst"

    Determines how requests will be sent

    • sequential - through the interval
    • burst - in parallel, the maximum number of requests (attention, may cause an EAI_AGAIN error)

    sequential

    apiRetryLimit: number

    The number of retries at calling

    3

    apiTimeout: number

    Wait time for one request

    10000

    apiVersion: string

    VK API version

    apiWait: number

    Time to wait before re-querying

    3000

    callbackService?: CallbackService
    language?: "ru" | "be" | "en" | "es" | "fi" | "de" | "it" | "uk"

    The return data language

    token: string

    Access token