stackexchange-api
Version:
A Node.js wrapper for the StackExchange API
37 lines (36 loc) • 1.38 kB
TypeScript
import { Answer, Badge, Comment, Filter, Info, Post, Privilege, Question, Site, Tag } from '../index';
import { TypeWrapper } from '../interfaces/result-types/ResultTypes';
declare type ClassType = 'Answer' | 'Badge' | 'Comment' | 'Filter' | 'Info' | 'Post' | 'Privilege' | 'Question' | 'Site' | 'Tag';
/**
* The equivalent of the [Common Wrapper Object](https://api.stackexchange.com/docs/wrapper).<br>
* All responses in the API share a common format, so as to make parsing these responses simpler.
*/
export declare class Wrapper<T extends Answer | Badge | Comment | Filter | Info | Post | Privilege | Question | Site | Tag> {
/**
* *May be absent, in which case it is set to `null`*
*/
backoff: number | null;
/**
* Refers to an [[Error]]<br>
* *May be absent, in which case it is set to `null`*
*/
errorId: number | null;
/**
* *May be absent, in which case it is set to `null`*
*/
errorMessage: string | null;
/**
* *May be absent, in which case it is set to `null`*
*/
errorName: string | null;
hasMore: boolean | null;
items: T[] | null;
page: number | null;
pageSize: number | null;
quotaMax: number | null;
quotaRemaining: number | null;
total: number | null;
type: string | null;
constructor(wrapper?: TypeWrapper, classType?: ClassType);
}
export {};