Class NeuroClient

Hierarchy (View Summary)

Constructors

Properties

apiToken?: string

Optional field.

Allow use official "API" (only allow get summarized link to 300.ya.ru)

fetchOpts: Record<string, unknown>
headers: Record<string, string>
host: string
hostSchemaRe: RegExp
hostTH: string
paths: {
    sharing: string;
    sharingUrl: string;
    summarizeVideo: string;
    summarizeWithCookie: string;
    summarizeWithSec: string;
} = ...

/api/neuro/generation - requires sec headers /api/generation - requires session cookie /api/sharing-url - requires API Token

schema: URLSchema
schemaTH: string
sessionIdCookie?: string

Optional field. Allow use all summarizeXX methods except summarizeVideo with outdated YaHMAC key. To enable it login to any ya website and set your Session_id cookie value

Lifetime: ~6 months

sessions: Partial
userAgent: string

Methods

  • Parameters

    Returns Promise<{ expires: number; secretKey: string; uuid: string }>

  • Parameters

    • body: unknown
    • Optionalheaders: Record<string, string>
    • Optionalmethod: string

    Returns { body: unknown; headers: { [x: string]: string }; method: string }

  • Returns { headers: Record<string, string>; path: string }

  • Type Parameters

    • T = ArrayBuffer

    Parameters

    • path: string
    • body: Uint8Array
    • Optionalheaders: Record<string, string>
    • Optionalmethod: string

    Returns Promise<ClientResponse<T>>

  • Type Parameters

    • T = unknown

    Parameters

    • path: string
    • Optionalbody: unknown
    • Optionalheaders: Record<string, string>
    • Optionalmethod: string

    Returns Promise<ClientResponse<T>>

  • The standard method for requesting the TH Backend API

    Type Parameters

    • T = unknown

    Parameters

    • path: string
    • body: any
    • headers: Record<string, string> = {}

    Returns Promise<ClientResponse<T>>