@JsonClass(true) data class Submission : Contribution, Votable, Saveable, Created, Editable, Distinguishable, Gildable, Replyable, Parcelable
This class represents a user post in a specific Subreddit, this class can be replied to, in a form of a comment section.
The user submission can be a text post, a link to a Url or can include images/media.
<init> |
This class represents a user post in a specific Subreddit, this class can be replied to, in a form of a comment section. Submission(id: String, fullname: String, allAwarding: List<Awarding>?, author: String, authorFlairBackgroundColor: String?, authorFlairCssClass: String?, authorFlairText: String?, authorFlairTextColor: String?, authorFlairTemplateId: String?, authorFlairType: String?, authorFullname: String?, canGild: Boolean, clicked: Boolean, created: Long, createdUtc: Long, crosspostParentFullname: String?, crosspostParentList: List<Submission>?, distinguishedRaw: String?, domain: String, editedRaw: Any, linkFlairBackgroundColor: String?, linkFlairCssClass: String?, linkFlairText: String?, linkFlairTextColor: String?, linkFlairTemplateId: String?, linkFlairType: String?, galleryData: GalleryData?, gildings: Gildings, isArchived: Boolean, isCrosspostable: Boolean, isGallery: Boolean?, isHidden: Boolean, isLocked: Boolean, isMediaOnly: Boolean, isMeta: Boolean, isPinned: Boolean, isQuarantined: Boolean, isRedditMediaDomain: Boolean, isRobotIndexable: Boolean, isSaved: Boolean, isSelf: Boolean, isSpoiler: Boolean, isStickied: Boolean, isVideo: Boolean, likes: Boolean?, media: Media?, mediaEmbed: MediaEmbed, mediaMetadata: Map<String, GalleryMedia>?, redditMedia: RedditMedia?, numCrossposts: Int, numComments: Int, over18: Boolean, permalink: String, preview: SubmissionPreview?, pollData: PollData?, removedByCategory: String?, score: Int, selfText: String?, selfTextHtml: String?, subreddit: String, subredditId: String, subredditNamePrefixed: String, subredditSubscribers: Int, thumbnailUrl: String?, thumbnailWidth: Int?, thumbnailHeight: Int?, title: String, upvoteRatio: Float?, url: String) |
allAwarding |
List of the submission's received awardings. val allAwarding: List<Awarding>? |
author |
Name of the Submission's author. val author: String |
authorFlairBackgroundColor |
background color of the author's flair, used in the site UI. val authorFlairBackgroundColor: String? |
authorFlairCssClass |
predefined css class of the author's flair, used in the site UI. val authorFlairCssClass: String? |
authorFlairTemplateId |
template id of the author's flair, used in the site UI. val authorFlairTemplateId: String? |
authorFlairText |
plain text of the author's flair. val authorFlairText: String? |
authorFlairTextColor |
text color of the author's flair, used in the site UI. val authorFlairTextColor: String? |
authorFlairType |
type of author flair val authorFlairType: String? |
authorFullname |
val authorFullname: String? |
canGild |
whether this item can be given a gilding or not. val canGild: Boolean |
clicked |
val clicked: Boolean |
created |
The unix-time Long representing the creation date of the item. val created: Long |
createdUtc |
The unix-time Long representing the UTC creation date of the item. val createdUtc: Long |
crosspostParentFullname |
val crosspostParentFullname: String? |
crosspostParentList |
val crosspostParentList: List<Submission>? |
distinguishedRaw |
to allow determining whether they have been distinguished by moderators/admins. null = not distinguished. moderator = the green. admin = the red. special = various other special distinguishes. NOTE: use the extensions in Distinguishable to have an enum representation. val distinguishedRaw: String? |
domain |
val domain: String |
editedRaw |
false if not edited, edit date in UTC epoch-seconds otherwise. NOTE: for some old edited comments on reddit.com, this will be set to true instead of edit date. Since this field can be a Boolean or a Long value, it's kept as Any, use the field in the Editable interface to get a nullable Long version, which is more practical to use. val editedRaw: Any |
fullname |
Fullname of sumbission, e.g. "t1_c3v7f8u" val fullname: String |
galleryData |
val galleryData: GalleryData? |
gildings |
the number of times this comment received reddit gold, silver, platinum. val gildings: Gildings |
id |
This item identifier, e.g. "8xwlg" val id: String |
isArchived |
val isArchived: Boolean |
isCrosspostable |
val isCrosspostable: Boolean |
isGallery |
val isGallery: Boolean? |
isHidden |
val isHidden: Boolean |
isLocked |
val isLocked: Boolean |
isMediaOnly |
val isMediaOnly: Boolean |
isMeta |
val isMeta: Boolean |
isPinned |
val isPinned: Boolean |
isQuarantined |
val isQuarantined: Boolean |
isRedditMediaDomain |
val isRedditMediaDomain: Boolean |
isRobotIndexable |
val isRobotIndexable: Boolean |
isSaved |
if this item is saved in the current user account val isSaved: Boolean |
isSelf |
val isSelf: Boolean |
isSpoiler |
val isSpoiler: Boolean |
isStickied |
val isStickied: Boolean |
isVideo |
val isVideo: Boolean |
likes |
how the logged-in user has voted on the item, True = upvoted, False = downvoted, null = no vote NOTE: use the extensions to have a practical enum class. val likes: Boolean? |
linkFlairBackgroundColor |
val linkFlairBackgroundColor: String? |
linkFlairCssClass |
val linkFlairCssClass: String? |
linkFlairTemplateId |
val linkFlairTemplateId: String? |
linkFlairText |
val linkFlairText: String? |
linkFlairTextColor |
val linkFlairTextColor: String? |
linkFlairType |
val linkFlairType: String? |
media |
val media: Media? |
mediaEmbed |
val mediaEmbed: MediaEmbed |
mediaMetadata |
val mediaMetadata: Map<String, GalleryMedia>? |
numComments |
val numComments: Int |
numCrossposts |
val numCrossposts: Int |
over18 |
val over18: Boolean |
permalink |
val permalink: String |
pollData |
val pollData: PollData? |
preview |
val preview: SubmissionPreview? |
redditMedia |
val redditMedia: RedditMedia? |
removedByCategory |
val removedByCategory: String? |
score |
the net-score of the item. val score: Int |
selfText |
val selfText: String? |
selfTextHtml |
val selfTextHtml: String? |
subreddit |
val subreddit: String |
subredditId |
val subredditId: String |
subredditNamePrefixed |
val subredditNamePrefixed: String |
subredditSubscribers |
val subredditSubscribers: Int |
thumbnailHeight |
the height of the thumbnail image, given there is one. val thumbnailHeight: Int? |
thumbnailUrl |
the url of the thumbnail image, given there is one. val thumbnailUrl: String? |
thumbnailWidth |
the width of the thumbnail image, given there is one. val thumbnailWidth: Int? |
title |
the title of this submission. val title: String |
upvoteRatio |
val upvoteRatio: Float? |
url |
val url: String |
createdDate |
Useful extension to convert the creation date property, from the Long unixtime, to a more practical Date object. val Created.createdDate: Date |
createdUtcDate |
Useful extension to convert the utc creation date property, from the Long unixtime, to a more practical Date object. val Created.createdUtcDate: Date |
distinguished |
Useful extension to map to an enum. val Distinguishable.distinguished: Distinguished |
edited |
val Editable.edited: Date |
hasEdited |
val Editable.hasEdited: Boolean |
vote |
Useful extension to map to an enum. val Votable.vote: Vote |