stackexchange-api
Version:
A Node.js wrapper for the StackExchange API
43 lines (42 loc) • 1.37 kB
TypeScript
import { Comment } from './Comment';
import { ShallowUser } from './ShallowUser';
import { TypePost } from '../interfaces/result-types/TypePost';
/**
* The equivalent of [Type post](https://api.stackexchange.com/docs/types/post).<br>
* This object represents the intersection of the [[Question]] and [[Answer]] objects.<br>
* It's used in cases where it would be beneficial to mix [[Question|Questions]] and [[Answer|Answers]] in a response.
*/
export declare class Post {
body: string | null;
bodyMarkdown: string | null;
commentCount: number | null;
/**
* *May be absent, in which case it is set to `null`*
*/
comments: Comment[] | null;
creationDate: Date | null;
downVoteCount: number | null;
downvoted: 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`*
*/
owner: ShallowUser | null;
/**
* Refers to a [[Post]]
*/
postId: number | null;
postType: 'question' | 'answer' | null;
score: number | null;
shareLink: string | null;
title: string | null;
upVoteCount: number | null;
upvoted: boolean | null;
constructor(post?: TypePost);
}