UNPKG

nodevk-ts

Version:

Simple Node.js module that allows you to interact with the VKontakte API.

19 lines (18 loc) 706 B
import { IMethodParams } from "../app.js"; import Session from "../Session/Session.js"; export declare type TypeSession = "user" | "group" | "app"; export declare class InvokeMethodException extends Error { constructor(method_name: string, TypeSession: TypeSession, additional_message?: string); } export interface CountingResponse<T> { count: number; items: T[]; } export declare type SingleOrArray<T> = T | T[]; export default abstract class API { protected Session: Session; protected type: TypeSession; constructor(Session: Session); checkValid(...types: TypeSession[]): boolean; protected call<T>(method: string, params: IMethodParams): Promise<T>; }