UNPKG

stackexchange-api

Version:
110 lines (109 loc) 3.37 kB
import { Answer } from './Answer'; import { ClosedDetails } from './ClosedDetails'; import { Comment } from './Comment'; import { MigrationInfo } from './MigrationInfo'; import { Notice } from './Notice'; import { ShallowUser } from './ShallowUser'; import { TypeQuestion } from '../interfaces/result-types/TypeQuestion'; /** * The equivalent of [Type question](https://api.stackexchange.com/docs/types/question).<br> * This object represents a Question on one of the [Stack Exchange sites](https://stackexchange.com/sites).<br> * This object is heavily inspired by the Question page itself, and can optionally return [[Comment|Comments]] and [[Answer|Answers]] accordingly. */ export declare class Question { /** * *May be absent, in which case it is set to `null`* */ acceptedAnswerId: number | null; answerCount: number | null; /** * *May be absent, in which case it is set to `null`* */ answers: Answer[] | null; body: string | null; bodyMarkdown: string | null; /** * *May be absent, in which case it is set to `null`* */ bountyAmount: number | null; /** * *May be absent, in which case it is set to `null`* */ bountyClosesDate: Date | null; /** * *May be absent, in which case it is set to `null`* */ bountyUser: ShallowUser | null; canClose: boolean | null; canFlag: boolean | null; closeVoteCount: number | null; /** * *May be absent, in which case it is set to `null`* */ closedDate: Date | null; /** * *May be absent, in which case it is set to `null`* */ closedDetails: ClosedDetails | null; /** * *May be absent, in which case it is set to `null`* */ closedReason: string | null; commentCount: number | null; /** * *May be absent, in which case it is set to `null`* */ comments: Comment[] | null; /** * *May be absent, in which case it is set to `null`* */ communityOwnedDate: Date | null; creationDate: Date | null; deleteVoteCount: number | null; downVoteCount: number | null; downvoted: boolean | null; favoriteCount: number | null; favorited: boolean | null; isAnswered: boolean | null; lastActivityDate: Date | null; /** * *May be absent, in which case it is set to `null`* */ lastEditDate: Date | null; lastEditor: ShallowUser | null; link: string | null; /** * *May be absent, in which case it is set to `null`* */ lockedDate: Date | null; /** * *May be absent, in which case it is set to `null`* */ migratedFrom: MigrationInfo | null; /** * *May be absent, in which case it is set to `null`* */ migratedTo: MigrationInfo | null; notice: Notice | null; /** * *May be absent, in which case it is set to `null`* */ owner: ShallowUser | null; /** * *May be absent, in which case it is set to `null`* */ protectedDate: Date | null; /** * Refers to a [[Question]] */ questionId: number | null; reopenVoteCount: number | null; score: number | null; shareLink: string | null; tags: string[] | null; title: string | null; upVoteCount: number | null; upvoted: boolean | null; viewCount: number | null; constructor(question?: TypeQuestion); }