posts

Documentation for discourse JSON objects

License: MIT

posts.PostType

Discourse Post Type Enum

Kind: static enum property of posts
Read only: true
Properties

Name Default Description
regular 1 Represents a regular forum post
moderator_action 2 Represents a post that is the result of a moderator action
listing_action 3 Represents a post that is the result of a listing/unlisting action

posts.PostActionType

Discourse Post Action Type Enum

Kind: static enum property of posts
Read only: true
Properties

Name Default Description
bookmark 1 Bookmark Action
like 2 Like Action
off_topic 3 Flag Post as Off Topic
inappropriate 4 Flag Post as Inappropriate
vote 5 Vote in a poll
notify_user 6 Send the post owner a message
notify_moderators 7 Flag for moderator attention with custom message
spam 8 Flag post as Spam

posts.ActionSummary : object

Discourse Post Action Summary

Kind: static typedef of posts

Param Type Description
id PostActionType ActionSummary Id
count number Number of applied actions
hidden boolean Is this action type hidden?
can_act boolean Can currently logged in user perform this action?
[can_defer_flags] boolean Can the currently logged in user defer these flags?

posts.Post : object

Discourse Post Object

Can be retrieved directly at /posts/<postid>.json

Kind: static typedef of posts

Param Type Description
id number Post Id of the post. This number will not change
name string Long name of the post owner
username string Username of the post owner
avatar_template string URL template for post owner's avatar
uploaded_avatar_id number ID of the post owner's avatar
created_at string ISO formatted post creation time
cooked string HTMLified version of rawsuitable for placing in a web page
post_number number Ordinal of the post in topic. Can change.
post_type PostType Type of the post
updated_at string ISO formatted post last updates time
like_count number Count of likes the post has
reply_count number Count of direct replies to this post
reply_to_post_number number The post_number this post is a reply to
quote_count number Count of posts containing quotes from this post
avg_time number | null Unclear, Believe this is the average read time for this post
incoming_link_count number Count of incoming links to this post
reads number Count of the number of users that have read this post
score number Unclear, Believe this is used to determine if post is to be included in topic summary
yours boolean Flag whether this post is owned by the logged in user
topic_id number Topic Id that the post belongs to
topic_slug string URL slug of the topic
display_username string | null Display name of the post owner
primary_group_name string | null Primary Group for the post owner
version number Revision version of the post. Does not count ninja edits.
can_edit boolean Flag whether this post can be edited by the logged in user
can_delete boolean Flag whether this post can be deleted by the logged in user
can_recover boolean Flag whether this post can be undeleted by the logged in user
user_title string | null User title of the post owner
raw string Raw text of the post before being processed into cooked
moderator boolean Flags whether post owner has moderator powers
admin boolean Flags whether post owner has admin powers
staff boolean Flags whether post owner has staff powers
user_id number Discourse user id of the post owner
hidden boolean Flag whether the post is hiden
hidden_reason_id number | null Reason the post is hidden
trust_level number Trust level of the post owner
deleted_at string | null Time post was deleted at in ISO format
user_deleted boolean Unclear, Believe flags the deletion status of the post user
edit_reason string | null Reason for most recent post edit
can_view_edit_history boolean Can the logged in user view post edit history of this post?
wiki boolean Is this post a wiki post?
reply_to_user external.users.UserSummary | null User that the post is in reply to
actions_summary Array.<ActionSummary> Actions summaries for this post
action_code string The type of action the post represents; used to determine the displayed icon
can_accept_answer boolean Whether this post can be accepted as an answer
can_unaccept_answer boolean Whether this post can be unaccepted as an answer
accepted_answer boolean | null Whether this post is an accepted answer

posts.CleanedPost : object

Cleaned Discourse Post

Created by SockBot from #Post. Not Produced by Discourse

Kind: static typedef of posts
Extends: external.module_posts.Post

Param Type Description
cleaned string The value of rawafter being processed to remove code and quotes
url string Direct URL link to this post
reply_to string Direct URL link to the post this post is in reply to