@__dirname/pixiv-web-api
    Preparing search index...

    Interface Options

    We make the option to be a shared options object. This allows our other functions to not depend on the context, but on the shared variable, so we can separate the API into files.

    interface Options {
        acceptLanguage?: string;
        baseURL?: string;
        cookie?: string;
        csrfToken?: string;
        fetch?: {
            (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
            (input: string | URL | Request, init?: RequestInit): Promise<Response>;
        };
        xUserId?: string
        | number;
    }
    Index

    Properties

    acceptLanguage?: string

    This will affect pixiv translation related fields, no need if run in browser

    "zh-CN"
    
    baseURL?: string
    "https://www.pixiv.net"
    
    cookie?: string

    The cookie header

    csrfToken?: string

    Required for POST requests (write operations). Extract from any pixiv page: "token":"<value>" in the HTML.

    fetch?: {
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
        (input: string | URL | Request, init?: RequestInit): Promise<Response>;
    }

    Type Declaration

      • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
      • Parameters

        • input: URL | RequestInfo
        • Optionalinit: RequestInit

        Returns Promise<Response>

      • (input: string | URL | Request, init?: RequestInit): Promise<Response>
      • Parameters

        • input: string | URL | Request
        • Optionalinit: RequestInit

        Returns Promise<Response>

    xUserId?: string | number