Post

Post

Represents a post created by a user

Constructor

new Post()

Source:

Members

background :PostBackground

Source:
The background of this post
Type:

backgroundID :number

Source:
The ID of the background of this post
Type:
  • number

comments :number

Source:
The amount of comments this post has
Type:
  • number

date :string

Source:
The date this post was created
Type:
  • string

id :number

Source:
The post ID
Type:
  • number

(nullable) imageUrl :string

Source:
The URL of the image if one is attached
Type:
  • string

message :string

Source:
The post text
Type:
  • string

userID :number

Source:
The ID of the author of this post
Type:
  • number

(nullable) videoStoryID :*

Source:
Unknown value
Type:
  • *

viewCount :number

Source:
The amount of views this post has
Type:
  • number

votes :number

Source:
The amount of votes this post has
Type:
  • number

Methods

delete() → {Promise.<void>}

Source:
Delete the post
Returns:
Type
Promise.<void>

downvote() → {Promise.<Number>}

Source:
Downvote this post
Returns:
- The new amount of votes
Type
Promise.<Number>

edit(text) → {Promise.<Post>}

Source:
Change the post text
Parameters:
Name Type Description
text string The new post text
Returns:
Type
Promise.<Post>

getUpvotes(count, indexopt, queryopt) → {Promise.<Array.<User>>}

Source:
Get the users who's upvoted this post
Parameters:
Name Type Attributes Default Description
count
index <optional>
0
query <optional>
Returns:
Type
Promise.<Array.<User>>

removeVote() → {Promise.<Number>}

Source:
Remove the vote from this post
Returns:
- The new amount of votes
Type
Promise.<Number>

upvote() → {Promise.<Number>}

Source:
Upvote this post
Returns:
- The new amount of votes
Type
Promise.<Number>