PostData
public struct PostData : Content
Used to return a ForumPost
‘s data.
Returned by:
POST /api/v3/forum/ID/create
POST /api/v3/forum/post/ID/update
POST /api/v3/forum/post/ID/image
POST /api/v3/forum/post/ID/image/remove
GET /api/v3/forum/ID/search/STRING
GET /api/v3/forum/post/search/STRING
POST /api/v3/forum/post/ID/laugh
POST /api/v3/forum/post/ID/like
POST /api/v3/forum/post/ID/love
POST /api/v3/forum/post/ID/unreact
GET /api/v3/forum/bookmarks
GET /api/v3/forum/likes
GET /api/v3/forum/mentions
GET /api/v3/forum/posts
GET /api/v3/forum/post/hashtag/#STRING
See ForumController.postCreateHandler(_:data:)
, ForumController.postUpdateHandler(_:data:)
,
ForumController.imageHandler(_:data:)
, ForumController.imageRemoveHandler(_:)
,
ForumController.forumSearchHandler(_:)
, ForumController.postSearchHandler(_:)
ForumController.postLaughHandler(_:)
, ForumController.postLikeHandler(_:)
ForumController.postLoveHandler(_:)
, ForumController.postUnreactHandler(_:)
,
ForumController.bookmarksHandler(_:)
, ForumCOntroller.likesHandler(_:)
,
ForumController.mentionsHandler(_:)
, ForumController.postsHandler(_:)
,
ForumController.postHashtagHandler(_:)
.
-
The ID of the post.
Declaration
Swift
var postID: Int
-
The timestamp of the post.
Declaration
Swift
var createdAt: Date
-
The post’s author.
Declaration
Swift
var author: UserHeader
-
The text of the post.
Declaration
Swift
var text: String
-
The filenames of the post’s optional images.
Declaration
Swift
var images: [String]?
-
Whether the current user has bookmarked the post.
Declaration
Swift
var isBookmarked: Bool
-
The total number of
LikeType
reactions on the post.Declaration
Swift
var likeCount: Int
-
Whether the post has been pinned to the forum.
Declaration
Swift
var isPinned: Bool?
-
Declaration
Swift
init( post: ForumPost, author: UserHeader, bookmarked: Bool, userLike: LikeType?, likeCount: Int, overrideQuarantine: Bool = false ) throws
-
Declaration
Swift
init(post: ForumPost, author: UserHeader) throws