stackexchange-api
Version:
A Node.js wrapper for the StackExchange API
50 lines (49 loc) • 4.44 kB
TypeScript
import { Answer, Badge, Comment, Filter, Info, Post, Privilege, Question, Site, Tag, Wrapper } from '../index';
import { AdvancedSearchOptions } from '../interfaces/method-options/StackExchange/AdvancedSearchOptions';
import { CreateFilterOptions } from '../interfaces/method-options/StackExchange/CreateFilterOptions';
import { DecodeFiltersOptions } from '../interfaces/method-options/StackExchange/DecodeFiltersOptions';
import { GetAnswersOptions } from '../interfaces/method-options/StackExchange/GetAnswersOptions';
import { GetAnswersByIdsOptions } from '../interfaces/method-options/StackExchange/GetAnswersByIdsOptions';
import { GetBadgesOptions } from '../interfaces/method-options/StackExchange/GetBadgesOptions';
import { GetBadgesByIdsOptions } from '../interfaces/method-options/StackExchange/GetBadgesByIdsOptions';
import { GetCommentsOptions } from '../interfaces/method-options/StackExchange/GetCommentsOptions';
import { GetCommentsByIdsOptions } from '../interfaces/method-options/StackExchange/GetCommentsByIdsOptions';
import { GetCommentsOnAnswersOptions } from '../interfaces/method-options/StackExchange/GetCommentsOnAnswersOptions';
import { GetInfoOptions } from '../interfaces/method-options/StackExchange/GetInfoOptions';
import { GetNamedOrTagBasedBadgesOptions } from '../interfaces/method-options/StackExchange/GetNamedOrTagBasedBadgesOptions';
import { GetPostsOptions } from '../interfaces/method-options/StackExchange/GetPostsOptions';
import { GetPostsByIdsOptions } from '../interfaces/method-options/StackExchange/GetPostsByIdsOptions';
import { GetPrivilegesOptions } from '../interfaces/method-options/StackExchange/GetPrivilegesOptions';
import { GetRecipientsBadgesOptions } from '../interfaces/method-options/StackExchange/GetRecipientsBadgesOptions';
import { GetRecipientsBadgesByIdsOptions } from '../interfaces/method-options/StackExchange/GetRecipientsBadgesByIdsOptions';
import { GetSitesOptions } from '../interfaces/method-options/StackExchange/GetSitesOptions';
import { GetTagsOptions } from '../interfaces/method-options/StackExchange/GetTagsOptions';
import { SearchOptions } from '../interfaces/method-options/StackExchange/SearchOptions';
import { SimilarSearchOptions } from '../interfaces/method-options/StackExchange/SimilarSearchOptions';
export declare class StackExchange {
protected static baseUrl: URL;
static advancedSearch(options: AdvancedSearchOptions): Promise<Wrapper<Question>>;
static createFilter(options: CreateFilterOptions): Promise<Wrapper<Filter>>;
static decodeFilters(options: DecodeFiltersOptions): Promise<Wrapper<Filter>>;
static getAnswers(options: GetAnswersOptions): Promise<Wrapper<Answer>>;
static getAnswersByIds(options: GetAnswersByIdsOptions): Promise<Wrapper<Answer>>;
static getBadges(options: GetBadgesOptions): Promise<Wrapper<Badge>>;
static getBadgesByIds(options: GetBadgesByIdsOptions): Promise<Wrapper<Badge>>;
static getNamedBadges(options: GetNamedOrTagBasedBadgesOptions): Promise<Wrapper<Badge>>;
static getTagBasedBadges(options: GetNamedOrTagBasedBadgesOptions): Promise<Wrapper<Badge>>;
static getRecipientsBadges(options: GetRecipientsBadgesOptions): Promise<Wrapper<Badge>>;
static getRecipientsBadgesByIds(options: GetRecipientsBadgesByIdsOptions): Promise<Wrapper<Badge>>;
static getComments(options: GetCommentsOptions): Promise<Wrapper<Comment>>;
static getCommentsByIds(options: GetCommentsByIdsOptions): Promise<Wrapper<Comment>>;
static getCommentsOnAnswers(options: GetCommentsOnAnswersOptions): Promise<Wrapper<Comment>>;
static getInfo(options: GetInfoOptions): Promise<Wrapper<Info>>;
static getPosts(options: GetPostsOptions): Promise<Wrapper<Post>>;
static getPostsByIds(options: GetPostsByIdsOptions): Promise<Wrapper<Post>>;
static getPrivileges(options: GetPrivilegesOptions): Promise<Wrapper<Privilege>>;
static getSites(options: GetSitesOptions): Promise<Wrapper<Site>>;
static getTags(options: GetTagsOptions): Promise<Wrapper<Tag>>;
static getModeratorOnlyTags(options: Omit<GetTagsOptions, 'moderatorOnly' | 'required'>): Promise<Wrapper<Tag>>;
static getRequiredTags(options: Omit<GetTagsOptions, 'moderatorOnly' | 'required'>): Promise<Wrapper<Tag>>;
static search(options: SearchOptions): Promise<Wrapper<Question>>;
static similarSearch(options: SimilarSearchOptions): Promise<Wrapper<Question>>;
}