Protected Member Functions | |
setAllAwardings (array $allAwardings) | |
setAllowLiveComments (bool $allowLiveComments) | |
setApprovedAtUtc (float $approvedAtUtc=null) | |
setApprovedBy (string $approvedBy=null) | |
setArchived (bool $archived) | |
setAuthor (string $author) | |
setAuthorCakeday (bool $authorCakeday=null) | |
setAuthorFlairBackgroundColor (string $authorFlairBackgroundColor=null) | |
setAuthorFlairCssClass (string $authorFlairCssClass=null) | |
setAuthorFlairRichtext (array $authorFlairRichtext) | |
setAuthorFlairTemplateId (string $authorFlairTemplateId=null) | |
setAuthorFlairText (string $authorFlairText=null) | |
setAuthorFlairTextColor (string $authorFlairTextColor=null) | |
setAuthorFlairType (string $authorFlairType) | |
setAuthorFullname (string $authorFullname) | |
setAuthorPatreonFlair (bool $authorPatreonFlair) | |
setBannedAtUtc (int $bannedAtUtc=null) | |
setBannedBy ($bannedBy=null) | |
setCanGild (bool $canGild) | |
setCanModPost (bool $canModPost) | |
setCategory (string $category=null) | |
setClicked (bool $clicked) | |
setCollections (array $collections=null) | |
setContentCategories (array $contentCategories=null) | |
setContestMode (bool $contestMode) | |
setCrosspostParent (string $crosspostParent=null) | |
setCrosspostParentList (array $crosspostParentList=null) | |
setDiscussionType (string $discussionType=null) | |
setDistinguished (string $distinguished) | |
setDomain (string $domain) | |
setDowns (int $downs) | |
setEdited ($edited) | |
setGilded (int $gilded) | |
setGildings (array $gildings) | |
setHidden (bool $hidden) | |
setHideScore (bool $hideScore) | |
setIsCrosspostable (bool $isCrosspostable) | |
setIsMeta (bool $isMeta) | |
setIsOriginalContent (bool $isOriginalContent) | |
setIsRedditMediaDomain (bool $isRedditMediaDomain) | |
setIsRobotIndexable (bool $isRobotIndexable) | |
setIsSelf (bool $isSelf) | |
setIsVideo (bool $isVideo) | |
setLikes (bool $likes=null) | |
setLinkFlairBackgroundColor (string $linkFlairBackgroundColor) | |
setLinkFlairCssClass (string $linkFlairCssClass=null) | |
setLinkFlairRichtext (array $linkFlairRichtext) | |
setLinkFlairTemplateId (string $linkFlairTemplateId=null) | |
setLinkFlairText (string $linkFlairText) | |
setLinkFlairTextColor (string $linkFlairTextColor) | |
setLinkFlairType (string $linkFlairType) | |
setLocked (bool $locked) | |
setMedia (array $media=null) | |
setMediaEmbed (array $mediaEmbed) | |
setMediaMetadata (array $mediaMetadata=null) | |
setMediaOnly (bool $mediaOnly) | |
setModNote (string $modNote=null) | |
setModReasonBy (string $modReasonBy=null) | |
setModReasonTitle (string $modReasonTitle=null) | |
setModReports (array $modReports) | |
setName (string $name) | |
setNoFollow (bool $noFollow) | |
setNumComments (int $numComments) | |
setNumCrossposts (int $numCrossposts) | |
setNumReports (int $numReports=null) | |
setOver18 (bool $over18) | |
setParentWhitelistStatus (string $parentWhitelistStatus) | |
setPermalink (string $permalink) | |
setPinned (bool $pinned) | |
setPostHint (string $postHint) | |
setPreview (array $preview) | |
setPwls (int $pwls) | |
setQuarantine (bool $quarantine) | |
setRemovalReason (string $removalReason=null) | |
setReportReasons (array $reportReasons) | |
setSaved (bool $saved) | |
setScore (int $score) | |
setSecureMedia (array $secureMedia=null) | |
setSecureMediaEmbed (array $secureMediaEmbed) | |
setSelftext (string $selftext) | |
setSelftextHtml (string $selftextHtml) | |
setSendReplies (bool $sendReplies) | |
setSpoiler (bool $spoiler) | |
setStickied (bool $stickied) | |
setSubreddit (string $subreddit) | |
setSubredditId (string $subredditId) | |
setSubredditNamePrefixed (string $subredditNamePrefixed) | |
setSubredditSubscribers (int $subredditSubscribers) | |
setSubredditType (string $subredditType) | |
setSuggestedSort (string $suggestedSort=null) | |
setThumbnail (string $thumbnail) | |
setThumbnailHeight ($thumbnailHeight=null) | |
setThumbnailWidth ($thumbnailWidth=null) | |
setTitle (string $title) | |
setTotalAwardsReceived (int $totalAwardsReceived) | |
setUps (int $ups) | |
setUrl (string $url) | |
setUserReports (array $userReports) | |
setViewCount (int $viewCount=null) | |
setVisited (bool $visited) | |
setWhitelistStatus (string $whitelistStatus) | |
setWls (int $wls) | |
Protected Member Functions inherited from snuze\Reddit\Thing\Thing | |
setId (string $id) | |
setKind (string $kind) | |
setCreated (float $created) | |
setCreatedUtc (float $createdUtc) | |
getPropertyTranslationMap () | |
Protected Member Functions inherited from snuze\SnuzeObject | |
debug (string $message, bool $echo=false) | |
info (string $message, bool $echo=false) | |
warning (string $message, bool $echo=false) | |
error (string $message, bool $echo=false) | |
Protected Attributes | |
$allAwardings = [] | |
$allowLiveComments = true | |
$approved = null | |
$approvedAtUtc = null | |
$approvedBy = null | |
$archived = false | |
$author = '' | |
$authorCakeday = null | |
$authorFlairBackgroundColor = null | |
$authorFlairCssClass = null | |
$authorFlairRichtext = [] | |
$authorFlairTemplateId = null | |
$authorFlairText = null | |
$authorFlairTextColor = null | |
$authorFlairType = '' | |
$authorFullname = '' | |
$authorPatreonFlair = false | |
$bannedAtUtc = null | |
$bannedBy = null | |
$canGild = true | |
$canModPost = false | |
$category = null | |
$clicked = false | |
$collections = null | |
$contentCategories = null | |
$contestMode = false | |
$crosspostParent = null | |
$crosspostParentList = null | |
$discussionType = null | |
$distinguished = '' | |
$domain = '' | |
$downs = 0 | |
$edited = false | |
$eventEnd = null | |
$eventIsLive = null | |
$eventStart = null | |
$gilded = 0 | |
$gildings = [] | |
$hidden = false | |
$hideScore = false | |
$ignoreReports = null | |
$isCrosspostable = true | |
$isMeta = false | |
$isOriginalContent = false | |
$isRedditMediaDomain = false | |
$isRobotIndexable = true | |
$isSelf = false | |
$isVideo = false | |
$likes = null | |
$linkFlairBackgroundColor = '' | |
$linkFlairCssClass = null | |
$linkFlairRichtext = [] | |
$linkFlairTemplateId = null | |
$linkFlairText = '' | |
$linkFlairTextColor = '' | |
$linkFlairType = '' | |
$locked = false | |
$media = null | |
$mediaEmbed = [] | |
$mediaMetadata = null | |
$mediaOnly = false | |
$modNote = null | |
$modReasonBy = null | |
$modReasonTitle = null | |
$modReports = [] | |
$name = '' | |
$noFollow = false | |
$numComments = 0 | |
$numCrossposts = 0 | |
$numReports = null | |
$over18 = false | |
$parentWhitelistStatus = '' | |
$permalink = '' | |
$pinned = false | |
$postHint = '' | |
$preview = [] | |
$pwls = 0 | |
$quarantine = false | |
$removalReason = null | |
$removed = null | |
$reportReasons = null | |
$rteMode = null | |
$saved = false | |
$score = 0 | |
$secureMedia = null | |
$secureMediaEmbed = [] | |
$selftext = '' | |
$selftextHtml = '' | |
$sendReplies = false | |
$spam = null | |
$spoiler = false | |
$stewardReports = [] | |
$stickied = false | |
$subreddit = '' | |
$subredditId = '' | |
$subredditNamePrefixed = '' | |
$subredditSubscribers = 0 | |
$subredditType = '' | |
$suggestedSort = null | |
$thumbnail = '' | |
$thumbnailHeight = null | |
$thumbnailWidth = null | |
$title = '' | |
$totalAwardsReceived = 0 | |
$ups = 0 | |
$url = '' | |
$userReports = [] | |
$viewCount = null | |
$visited = false | |
$whitelistStatus = '' | |
$wls = 0 | |
Protected Attributes inherited from snuze\Reddit\Thing\Thing | |
$_kind = null | |
$_propertyNames = [] | |
$_propertyTranslationRegex = '|([a-z])([A-Z0-9])|' | |
$_sourceJson = '' | |
$id = null | |
$created = 0.0 | |
$createdUtc = 0.0 | |
Protected Attributes inherited from snuze\SnuzeObject | |
$_snuzeId = null | |
$_snuzeClass = null | |
Additional Inherited Members | |
Static Public Member Functions inherited from snuze\Reddit\Thing\Thing | |
static | getValidKinds () |
Public Attributes inherited from snuze\Reddit\Thing\Thing | |
const | KIND_COMMENT = 't1' |
const | KIND_ACCOUNT = 't2' |
const | KIND_LINK = 't3' |
const | KIND_MESSAGE = 't4' |
const | KIND_SUBREDDIT = 't5' |
const | KIND_AWARD = 't6' |
const | REGEX_VALID_ID = '|^[a-z0-9]{1,13}$|i' |
The Link class represents the significant properties of a link, otherwise known as a submission, post, or thread. An attempt has been made to map all fields supplied by the API, regardless of their utility (or lack thereof).
Implementation warning: Array properties are currently populated as-is, without any further processing. Calling their getters will return an array holding key/value pairs defining the property. This is subject to change in a future major version, such that some other value(s) may be returned instead.
This file is part of Snuze, a PHP client for the Reddit API. Copyright 2019 Shaun Cummiskey shaun @sha unc.c omhttps://shaunc.com/ Repository: https://github.com/snuze/snuze/ Documentation: https://snuze.shaunc.com/
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
snuze\Reddit\Thing\Link::__construct | ( | ) |
Constructor.
References snuze\Reddit\Thing\Thing\KIND_LINK.
snuze\Reddit\Thing\Link::getAllAwardings | ( | ) |
Get an array defining the type and quantity of all awards (gold, silver, platinum...) this link has received.
snuze\Reddit\Thing\Link::getAllowLiveComments | ( | ) |
Get whether or not comments on this link can be sorted by "live," which is an experimental feature.
snuze\Reddit\Thing\Link::getApproved | ( | ) |
Get whether or not this link was manually approved by a moderator.
This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.
snuze\Reddit\Thing\Link::getApprovedAtUtc | ( | ) |
If this link was manually approved by a moderator, get the unix epoch at which that occurred, else null.
This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.
snuze\Reddit\Thing\Link::getApprovedBy | ( | ) |
If this link was approved by a moderator, get the username of the mod who approved it, else null.
This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.
snuze\Reddit\Thing\Link::getArchived | ( | ) |
Get whether or not this link is archived and can no longer be voted or commented on.
snuze\Reddit\Thing\Link::getAuthor | ( | ) |
Get the username of the Reddit account that submitted this link.
snuze\Reddit\Thing\Link::getAuthorCakeday | ( | ) |
Get whether or not the "cake day" flair should decorate this link to celebrate its author's Reddit birthday.
This property is transient and will only be true if the link is fetched during the duration of its author's cake day.
snuze\Reddit\Thing\Link::getAuthorFlairBackgroundColor | ( | ) |
Get the HTML hex color code for the author's user flair background, if any. The literal string "transparent" has also been observed in this property.
snuze\Reddit\Thing\Link::getAuthorFlairCssClass | ( | ) |
Get the CSS class corresponding to the author's user flair, if any
snuze\Reddit\Thing\Link::getAuthorFlairRichtext | ( | ) |
Get the array containing the elements that define the author's user flair, if any.
snuze\Reddit\Thing\Link::getAuthorFlairTemplateId | ( | ) |
Get the 36-character UUID of the author's user flair template, if any
snuze\Reddit\Thing\Link::getAuthorFlairText | ( | ) |
Get the author's user flair text, if any
snuze\Reddit\Thing\Link::getAuthorFlairTextColor | ( | ) |
Get the color, either "dark" or "light", of the author's user flair text, if any
snuze\Reddit\Thing\Link::getAuthorFlairType | ( | ) |
Get the author's user flair type, if any; e.g. "text" or "richtext"
snuze\Reddit\Thing\Link::getAuthorFullname | ( | ) |
Get the Reddit internal "thing" fullname of the author, e.g. "t2_bva6"
snuze\Reddit\Thing\Link::getAuthorPatreonFlair | ( | ) |
Get whether or not the author is a patron (via Patreon) of the subreddit where this link is posted, granting them special flair
snuze\Reddit\Thing\Link::getBannedAtUtc | ( | ) |
If this link was removed by a moderator, get the unix epoch at which this occurred, else null.
This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.
snuze\Reddit\Thing\Link::getBannedBy | ( | ) |
If this link was removed by a moderator, get the username of the mod who removed it. If this link was removed by the system (e.g. flagged as spam) but that decision hasn't been confirmed by a moderator, returns the literal string '[auto]'. If the link has not been removed either way, returns null.
This is a mutant field. When a link is removed by a human moderator, Reddit sends that mod's username. When a link is removed by the system, e.g. flagged as spam, Reddit sends boolean true. I had to settle on one datatype, so I went with a string and picked the '[auto]' value to distinguish unconfirmed automated removals.
This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.
snuze\Reddit\Thing\Link::getCanGild | ( | ) |
Get whether or not the link is eligible for gilding by the currently authenticated user. (You can't gild your own links.)
snuze\Reddit\Thing\Link::getCanModPost | ( | ) |
Get whether or not the currently authenticated user is permitted to moderate this link.
snuze\Reddit\Thing\Link::getCategory | ( | ) |
Get the category name, if any, assigned to this link.
snuze\Reddit\Thing\Link::getClicked | ( | ) |
Get whether or not the currently authenticated user has opened this link, if the user has the "Remember what links you've visited across computers" preference enabled (?) Not entirely sure on this.
snuze\Reddit\Thing\Link::getCollections | ( | ) |
If this link is a collection, get the array that defines the other links in the collection, else null
snuze\Reddit\Thing\Link::getContentCategories | ( | ) |
Get an array that defines this link's content categories, if any are assigned
snuze\Reddit\Thing\Link::getContestMode | ( | ) |
Get whether or not this link has been designated as being in contest mode for purposes of comment display
snuze\Reddit\Thing\Link::getCrosspostParent | ( | ) |
If this link is a crosspost, get the Reddit internal fullname of the original link e.g. "t3_clcb1h", else null
snuze\Reddit\Thing\Link::getCrosspostParentList | ( | ) |
If this link is a crosspost, get an array defining the significant properties of the original link, else null
snuze\Reddit\Thing\Link::getDiscussionType | ( | ) |
Get the discussion type for this link's comment thread, if any. If the link was created as a chat post (e.g. "t3_cmhugu"), this will be set to "CHAT"
snuze\Reddit\Thing\Link::getDistinguished | ( | ) |
Get the type of distinguishment set on this link (e.g. 'moderator', 'admin', 'special'), if any
snuze\Reddit\Thing\Link::getDomain | ( | ) |
Get the domain this link points to. For text-only self posts, this will be the string 'self.' followed by the subreddit name.
snuze\Reddit\Thing\Link::getDowns | ( | ) |
Get the number of downvotes that have been recorded on this link. This is generally not provided by the API; instead, refer to "ups" and "score"
snuze\Reddit\Thing\Link::getEdited | ( | ) |
Get the unix epoch timestamp at which this link was edited, or 0.0 if it hasn't been edited.
This is a mutant field. If a link has been edited, Reddit returns the epoch timestamp as a float. If it hasn't been edited, Reddit returns boolean false. I had to settle on one datatype, so float it is.
snuze\Reddit\Thing\Link::getEventEnd | ( | ) |
If this link is marked as an event, get the unix epoch at which the event is scheduled to end, else null
snuze\Reddit\Thing\Link::getEventIsLive | ( | ) |
If this link is marked as an event, get whether or not it's currently active at the time the link was fetched
snuze\Reddit\Thing\Link::getEventStart | ( | ) |
If this link is marked as an event, get the unix epoch at which the event is scheduled to begin, else null
snuze\Reddit\Thing\Link::getGilded | ( | ) |
Get the number of times this link has been gilded
snuze\Reddit\Thing\Link::getGildings | ( | ) |
Get an array that defines the gildings for this link
snuze\Reddit\Thing\Link::getHidden | ( | ) |
Get whether or not the currently authenticated user has hidden this link
snuze\Reddit\Thing\Link::getHideScore | ( | ) |
Get whether or not the vote score of this link was hidden at the time the link was fetched.
snuze\Reddit\Thing\Link::getIgnoreReports | ( | ) |
Get whether or not a moderator has set the "ignore reports" flag on this link.
This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.
snuze\Reddit\Thing\Link::getIsCrosspostable | ( | ) |
Get whether or not this link is eligible to be crossposted to another subreddit.
snuze\Reddit\Thing\Link::getIsMeta | ( | ) |
Get whether or not this link is marked as a meta-post (?)
snuze\Reddit\Thing\Link::getIsOriginalContent | ( | ) |
Get whether or not this link is marked with the "OC" tag
snuze\Reddit\Thing\Link::getIsRedditMediaDomain | ( | ) |
Get whether or not the link target points to a Reddit-owned domain
snuze\Reddit\Thing\Link::getIsRobotIndexable | ( | ) |
Get whether or not this link is eligible to be indexed by search engines. When this is false, the link's page will have a <meta name="robots" content="noindex,nofollow"> tag added to it.
snuze\Reddit\Thing\Link::getIsSelf | ( | ) |
Get whether or not this link is a self (text-only) post.
snuze\Reddit\Thing\Link::getIsVideo | ( | ) |
Get whether or not this link is a video that was uploaded directly to Reddit and is hosted at v.redd.it
snuze\Reddit\Thing\Link::getLikes | ( | ) |
Get whether or not the currently authenticated user has voted on this link. A value of true indicates an upvote, a value of false indicates a downvote, a null value indicates no vote.
snuze\Reddit\Thing\Link::getLinkFlairBackgroundColor | ( | ) |
Get the HTML hex color code for the link's flair background, if any
snuze\Reddit\Thing\Link::getLinkFlairCssClass | ( | ) |
Get the CSS class corresponding to the link's flair, if any
snuze\Reddit\Thing\Link::getLinkFlairRichtext | ( | ) |
Get the array containing the elements that define the link's flair, if any
snuze\Reddit\Thing\Link::getLinkFlairTemplateId | ( | ) |
Get the 36-character UUID of the link's flair template, if any
snuze\Reddit\Thing\Link::getLinkFlairText | ( | ) |
Get the link's flair text, if any
snuze\Reddit\Thing\Link::getLinkFlairTextColor | ( | ) |
Get the color, either "dark" or "light", of the link's flair text, if any
snuze\Reddit\Thing\Link::getLinkFlairType | ( | ) |
Get the link's flair type, if any; e.g. "text" or "richtext"
snuze\Reddit\Thing\Link::getLocked | ( | ) |
Get whether or not this link has been locked, preventing further comments from being posted
snuze\Reddit\Thing\Link::getMedia | ( | ) |
Get an array defining any recognized media this link points to. Reddit is able to identify media types and metadata from itself, as well as from certain external sites like YouTube, Twitter, etc.
snuze\Reddit\Thing\Link::getMediaEmbed | ( | ) |
Get an array defining the HTML properties required to embed recognized media objects
snuze\Reddit\Thing\Link::getMediaMetadata | ( | ) |
Get an array defining any recognized media that was linked to within the text (self post) portion of this link. Reddit is able to identify media types and metadata from itself, as well as from certain external sites like YouTube, Twitter, etc.
snuze\Reddit\Thing\Link::getMediaOnly | ( | ) |
Get whether or not this link contains media only (?) This hasn't been observed set to true.
snuze\Reddit\Thing\Link::getModNote | ( | ) |
If this link was removed by a moderator, and the mod filled out the "Add a removal reason" dialog, get the text supplied by the moderator. If this link hasn't been removed by a moderator or if no reason was given, returns null.
This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.
snuze\Reddit\Thing\Link::getModReasonBy | ( | ) |
If this link was removed by a moderator, and the mod filled out the "Add a removal reason" dialog, get the username of that moderator. If this link hasn't been removed by a moderator or if no reason was given, returns null.
This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.
snuze\Reddit\Thing\Link::getModReasonTitle | ( | ) |
If this link was removed by a moderator, and the mod chose a canned reason from the "Add a removal reason" dialog, get the title of the canned reason. If this link hasn't been removed by a moderator, or if the mod used a custom freeform removal message instead of a canned one, returns null.
This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.
snuze\Reddit\Thing\Link::getModReports | ( | ) |
Get an array defining any reports that have been lodged against this link by moderators of the subreddit where it resides
This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.
snuze\Reddit\Thing\Link::getName | ( | ) |
Get the Reddit internal "thing" fullname of this link, e.g. "t3_cjqwv5"
snuze\Reddit\Thing\Link::getNoFollow | ( | ) |
Get whether or not this link has a "no follow" flag set (?)
snuze\Reddit\Thing\Link::getNumComments | ( | ) |
Get the number of comments in this link's comment thread
snuze\Reddit\Thing\Link::getNumCrossposts | ( | ) |
Get the number of times this link has been crossposted to another subreddit
snuze\Reddit\Thing\Link::getNumReports | ( | ) |
Get the number of user reports that have been lodged against this link.
This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.
snuze\Reddit\Thing\Link::getOver18 | ( | ) |
Get whether or not this link is marked with the "NSFW" tag
snuze\Reddit\Thing\Link::getParentWhitelistStatus | ( | ) |
Get the advertising whitelist status for this link's subreddit, if set. This indicates which types of ads are eligible to be displayed in the subreddit. The link itself may have a different whitelist status; this is typically the case when a link is marked NSFW but its subreddit is not marked NSFW.
snuze\Reddit\Thing\Link::getPermalink | ( | ) |
Get the portion of this link's permanent URL relative to https://reddit.com/
snuze\Reddit\Thing\Link::getPinned | ( | ) |
Get whether or not this link is pinned
snuze\Reddit\Thing\Link::getPostHint | ( | ) |
Get the post type hint (e.g. "image", "rich:video") set for this link, if any.
snuze\Reddit\Thing\Link::getPreview | ( | ) |
Get an array defining the different preview images available for this link, if any.
snuze\Reddit\Thing\Link::getPwls | ( | ) |
Get the numeric whitelist status key for this link's subreddit, if set. A text version of the corresponding whitelist status is available in getParentWhitelistStatus()
snuze\Reddit\Thing\Link::getQuarantine | ( | ) |
Get whether or not this link is in a quarantined subreddit
snuze\Reddit\Thing\Link::getRemovalReason | ( | ) |
Get the reason this link was removed (?)
When a link is removed by a moderator, the reason appears in mod_note; the removal_reason field has not been observed to be populated
snuze\Reddit\Thing\Link::getRemoved | ( | ) |
Get whether or not this link has been removed by a moderator
snuze\Reddit\Thing\Link::getReportReasons | ( | ) |
Per Reddit, this is deprecated and you should use mod_reports and user_reports instead.
snuze\Reddit\Thing\Link::getRteMode | ( | ) |
Get the rich text editor mode (e.g. "markdown") that was used to write the text in this post, if any.
This is an author-only property. To receive an accurate value, the currently authenticated user must be the user who submitted the link.
snuze\Reddit\Thing\Link::getSaved | ( | ) |
Get whether or not the currently authenticated user has saved this link
snuze\Reddit\Thing\Link::getScore | ( | ) |
Get the vote score of this link
snuze\Reddit\Thing\Link::getSecureMedia | ( | ) |
Get an array defining any recognized media this link points to which is served over TLS (https URLs). This may be a subset of getMedia(), or it may be identical, if all of the recognized media is served securely.
snuze\Reddit\Thing\Link::getSecureMediaEmbed | ( | ) |
Get an array defining the HTML properties required to embed recognized media objects which are served over TLS (https URLs). This may be a subset of getMediaEmbed(), or it may be identical, if all of the recognized media is served securely.
snuze\Reddit\Thing\Link::getSelftext | ( | ) |
If this link is a text-only self post, get the text that comprises it
snuze\Reddit\Thing\Link::getSelftextHtml | ( | ) |
If this link is a text-only self post, get the HTML required to render the text that comprises it
snuze\Reddit\Thing\Link::getSendReplies | ( | ) |
Get whether or not "inbox replies" to the author are enabled on this link
snuze\Reddit\Thing\Link::getSpam | ( | ) |
Get whether or not a moderator has flagged this link as spam.
This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.
snuze\Reddit\Thing\Link::getSpoiler | ( | ) |
Get whether or not this link is marked with the "spoiler" tag
snuze\Reddit\Thing\Link::getStewardReports | ( | ) |
Get an array defining any reports that have been lodged against this link by... stewards? (Can't find an announcement of this as of 20190908)
This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.
snuze\Reddit\Thing\Link::getStickied | ( | ) |
Get whether or not this link is stickied at the top of the subreddit
snuze\Reddit\Thing\Link::getSubreddit | ( | ) |
Get the name of the subreddit this link resides in
snuze\Reddit\Thing\Link::getSubredditId | ( | ) |
Get the Reddit internal "thing" fullname of the subreddit this link resides in, e.g. "t5_2qi1v"
snuze\Reddit\Thing\Link::getSubredditNamePrefixed | ( | ) |
Get the name of the subreddit this link resides in, with its relative path e.g. "r/funny", or "u/joe" for user profile subreddits
snuze\Reddit\Thing\Link::getSubredditSubscribers | ( | ) |
Get the number of subscribers in the subreddit where this link resides
snuze\Reddit\Thing\Link::getSubredditType | ( | ) |
Get the type of access control enforced on the subreddit where this link resides. This should be one of ['public', 'restricted', 'private', 'employees_only']
snuze\Reddit\Thing\Link::getSuggestedSort | ( | ) |
Get the suggested sort order for comments on this link, if any has been set
snuze\Reddit\Thing\Link::getThumbnail | ( | ) |
Get the URL to the thumbnail image for this link, if any
snuze\Reddit\Thing\Link::getThumbnailHeight | ( | ) |
Get the thumbnail height pixel value, if any
snuze\Reddit\Thing\Link::getThumbnailWidth | ( | ) |
Get the thumbnail width pixel value, if any
snuze\Reddit\Thing\Link::getTitle | ( | ) |
Get this link's title
snuze\Reddit\Thing\Link::getTotalAwardsReceived | ( | ) |
Get the total number of awards (gold, platinum, etc.) this link has received
snuze\Reddit\Thing\Link::getUps | ( | ) |
Get the number of upvotes that have been recorded on this link
snuze\Reddit\Thing\Link::getUrl | ( | ) |
Get the URL to the target of this link. Text-only self posts will return a link to their own comment thread.
snuze\Reddit\Thing\Link::getUserReports | ( | ) |
Get an array defining any reports that have been lodged against this link by users. (Reports from moderators are stored separately in mod_reports.)
This is a moderator-only property. To receive an accurate value, the currently authenticated user must be a moderator of the subreddit where this link is posted.
snuze\Reddit\Thing\Link::getViewCount | ( | ) |
Get the number of times this link has been viewed.
(Or, don't. This attribute is not returned by the API.)
snuze\Reddit\Thing\Link::getVisited | ( | ) |
Get whether or not the currently authenticated user has visited this link. This will only be true if the user has gold, and has enabled the "remember links I've visited across computers" gold-only preference.
snuze\Reddit\Thing\Link::getWhitelistStatus | ( | ) |
Get the advertising whitelist status for this link, if set. This indicates which types of ads are eligible to be displayed.
snuze\Reddit\Thing\Link::getWls | ( | ) |
Get the numeric whitelist status key, if any. A text version of the corresponding whitelist status is available in getWhitelistStatus()
|
protected |
Set the array defining the type and quantity of all awards (gold, silver, platinum...) this link has received.
array | $allAwardings |
|
protected |
Set whether or not comments on this link can be sorted by "live," which is an experimental feature.
bool | $allowLiveComments |
snuze\Reddit\Thing\Link::setApproved | ( | bool | $approved = null | ) |
Set whether or not this link was manually approved by a moderator.
bool | $approved |
|
protected |
Set the epoch timestamp at which this link was manually approved by a moderator, if that occurred.
float | $approvedAtUtc |
|
protected |
Set the username of the moderator who manually approved this link, or null if it wasn't.
string | $approvedBy |
|
protected |
Set whether or not this link is archived and can no longer be voted or commented on.
bool | $archived |
|
protected |
Set the username of the Reddit account that submitted this link.
string | $author |
|
protected |
Set whether or not the "cake day" flair should decorate this link to celebrate its author's Reddit birthday.
bool | $authorCakeday |
|
protected |
Set the HTML hex color code for the author's user flair background, if any
string | $authorFlairBackgroundColor |
|
protected |
Set the CSS class corresponding to the author's user flair, if any
string | $authorFlairCssClass |
|
protected |
Set the array containing the elements that define the author's user flair, if any.
array | $authorFlairRichtext |
|
protected |
Set the 36-character UUID of the author's user flair template, if any
string | $authorFlairTemplateId |
|
protected |
Set the author's user flair text, if any
string | $authorFlairText |
|
protected |
Set the color, either "dark" or "light", of the author's user flair text, if any
string | $authorFlairTextColor |
|
protected |
Set the author's user flair type, if any; e.g. "text" or "richtext"
string | $authorFlairType |
|
protected |
Set the Reddit internal "thing" fullname of the author, e.g. "t2_bva6"
string | $authorFullname |
|
protected |
Set whether or not the author is a patron (via Patreon) of the subreddit where this link is posted, granting them special flair
bool | $authorPatreonFlair |
|
protected |
Set the unix epoch at which this post was removed by a moderator, if that occurred.
int | $bannedAtUtc |
|
protected |
Set the username of the moderator who removed this link, if that occurred, or the literal string '[auto]' if the link was removed by the system
mixed | $bannedBy |
|
protected |
Set whether or not the link is eligible for gilding by the currently authenticated user. (You can't gild your own links.)
bool | $canGild |
|
protected |
Set whether or not the currently authenticated user is permitted to moderate this link.
bool | $canModPost |
|
protected |
Set the category name, if any, assigned to this link.
string | $category |
|
protected |
Set whether or not the currently authenticated user has opened this link, if the user has the "Remember what links you've visited across computers" preference enabled (?) Not entirely sure on this.
bool | $clicked |
|
protected |
If this link is a collection, set the array that defines the other links in the collection
array | $collections |
|
protected |
Set an array that defines this link's content categories, if any are assigned
array | $contentCategories |
|
protected |
Set whether or not this link has been designated as being in contest mode for purposes of comment display
bool | $contestMode |
|
protected |
If this link is a crosspost, set the Reddit internal fullname of the original link
string | $crosspostParent |
|
protected |
If this link is a crosspost, set an array defining the significant properties of the original link
array | $crosspostParentList |
|
protected |
Set the discussion type for this link's comment thread, if any
string | $discussionType |
|
protected |
Set the type of distinguishment set on this link (e.g. 'moderator', 'admin', 'special'), if any
string | $distinguished |
|
protected |
Set the domain this link points to. For text-only self posts, this will be the string 'self.' followed by the subreddit name.
string | $domain |
|
protected |
Set the number of downvotes that have been recorded on this link
int | $downs |
|
protected |
Set the unix epoch timestamp at which this link was edited, or 0.0 if it hasn't been edited.
This is a mutant field. If a link has been edited, Reddit returns the epoch timestamp as a float. If it hasn't been edited, Reddit returns boolean false. I had to settle on one datatype, so float it is.
type | $edited |
snuze\Reddit\Thing\Link::setEventEnd | ( | float | $eventEnd = null | ) |
If this link is marked as an event, set the unix epoch at which the event is scheduled to end, else null
float | $eventEnd |
snuze\Reddit\Thing\Link::setEventIsLive | ( | bool | $eventIsLive = null | ) |
If this link is marked as an event, set whether or not it's currently active at the time the link was fetched
bool | $eventIsLive |
snuze\Reddit\Thing\Link::setEventStart | ( | float | $eventStart = null | ) |
If this link is marked as an event, set the unix epoch at which the event is scheduled to begin, else null
float | $eventStart |
|
protected |
Set the number of times this link has been gilded
int | $gilded |
|
protected |
Set an array that defines the gildings for this link
array | $gildings |
|
protected |
Set whether or not the currently authenticated user has hidden this link
bool | $hidden |
|
protected |
Set whether or not the vote score of this link was hidden at the time the link was fetched.
bool | $hideScore |
snuze\Reddit\Thing\Link::setIgnoreReports | ( | bool | $ignoreReports = null | ) |
Set whether or not a moderator has set the "ignore reports" flag on this link.
bool | $ignoreReports |
|
protected |
Set whether or not this link is eligible to be crossposted to another subreddit.
bool | $isCrosspostable |
|
protected |
Set whether or not this link is marked as a meta-post (?)
bool | $isMeta |
|
protected |
Set whether or not this link is marked with the "OC" tag
bool | $isOriginalContent |
|
protected |
Set whether or not the link target points to a Reddit-owned domain
bool | $isRedditMediaDomain |
|
protected |
Set whether or not this link is eligible to be indexed by search engines.
bool | $isRobotIndexable |
|
protected |
Set whether or not this link is a self (text-only) post.
bool | $isSelf |
|
protected |
Set whether or not this link is a video that was uploaded directly to Reddit and is hosted at v.redd.it
bool | $isVideo |
|
protected |
Set whether or not the currently authenticated user has voted on this link. A value of true indicates an upvote, a value of false indicates a downvote, a null value indicates no vote.
bool | $likes |
|
protected |
Set the HTML hex color code for the link's flair background, if any
string | $linkFlairBackgroundColor |
|
protected |
Set the CSS class corresponding to the link's flair, if any
string | $linkFlairCssClass |
|
protected |
Set the array containing the elements that define the link's flair, if any
array | $linkFlairRichtext |
|
protected |
Set the 36-character UUID of the link's flair template, if any
string | $linkFlairTemplateId |
|
protected |
Set the link's flair text, if any
string | $linkFlairText |
|
protected |
Set the color, either "dark" or "light", of the link's flair text, if any
string | $linkFlairTextColor |
|
protected |
Set the link's flair type, if any; e.g. "text" or "richtext"
string | $linkFlairType |
|
protected |
Get whether or not this link has been locked, preventing further comments from being posted
bool | $locked |
|
protected |
Set an array defining any recognized media this link points to. Reddit is able to identify media types and metadata from itself, as well as from certain external sites like YouTube, Twitter, etc.
array | $media |
|
protected |
Set an array defining the HTML properties required to embed recognized media objects
array | $mediaEmbed |
|
protected |
Set an array defining any recognized media that was linked to within the text (self post) portion of this link. Reddit is able to identify media types and metadata from itself, as well as from certain external sites like YouTube, Twitter, etc.
array | $mediaMetadata |
|
protected |
Set whether or not this link contains media only (?) This hasn't been observed set to true.
bool | $mediaOnly |
|
protected |
Set the "removal reason" note supplied by a moderator for removing this link, if any
string | $modNote |
|
protected |
Set the username of the moderator who wrote the "removal reason," if any
string | $modReasonBy |
|
protected |
Set the title of the canned "removal reason" used when a moderator removed this link, if that applies
string | $modReasonTitle |
|
protected |
Set an array defining any reports that have been lodged against this link by moderators of the subreddit where it resides
array | $modReports |
|
protected |
Set the Reddit internal "thing" fullname of this link, e.g. "t3_cjqwv5"
string | $name |
|
protected |
Set whether or not this link has a "no follow" flag set (?)
bool | $noFollow |
|
protected |
Set the number of comments in this link's comment thread
int | $numComments |
|
protected |
Set the number of times this link has been crossposted to another subreddit
int | $numCrossposts |
|
protected |
Set the number of user reports that have been lodged against this link.
int | $numReports |
|
protected |
Set whether or not this link is marked with the "NSFW" tag
bool | $over18 |
|
protected |
Set the advertising whitelist status for this link's subreddit, if set.
string | $parentWhitelistStatus |
|
protected |
Set the portion of this link's permanent URL relative to https://reddit.com/
string | $permalink |
|
protected |
Set whether or not this link is pinned
bool | $pinned |
|
protected |
Set the post type hint (e.g. "image", "rich:video") set for this link, if any.
string | $postHint |
|
protected |
Set an array defining the different preview images available for this link, if any.
array | $preview |
|
protected |
Set the numeric whitelist status key for this link's subreddit, if set.
int | $pwls |
|
protected |
Set whether or not this link is in a quarantined subreddit
bool | $quarantine |
|
protected |
Set the reason this link was removed (?)
string | $removalReason |
snuze\Reddit\Thing\Link::setRemoved | ( | bool | $removed = null | ) |
Set whether or not this link has been removed by a moderator
bool | $removed |
|
protected |
Per Reddit, this is deprecated and you should use mod_reports and user_reports instead.
array | $reportReasons |
snuze\Reddit\Thing\Link::setRteMode | ( | $rteMode | ) |
Set the rich text editor mode (e.g. "markdown") that was used to write the text in this post, if any.
type | $rteMode |
|
protected |
Set whether or not the currently authenticated user has saved this link
bool | $saved |
|
protected |
Set the vote score of this link
int | $score |
|
protected |
Set an array defining any recognized media this link points to which is served over TLS (https URLs).
array | $secureMedia |
|
protected |
Set an array defining the HTML properties required to embed recognized media objects which are served over TLS (https URLs)
array | $secureMediaEmbed |
|
protected |
If this link is a text-only self post, set the text that comprises it
string | $selftext |
|
protected |
If this link is a text-only self post, set the HTML required to render the text that comprises it
string | $selftextHtml |
|
protected |
Set whether or not "inbox replies" to the author are enabled on this link
bool | $sendReplies |
snuze\Reddit\Thing\Link::setSpam | ( | bool | $spam = null | ) |
Set whether or not a moderator has flagged this link as spam.
bool | $spam |
|
protected |
Set whether or not this link is marked with the "spoiler" tag
bool | $spoiler |
snuze\Reddit\Thing\Link::setStewardReports | ( | array | $stewardReports | ) |
Set an array defining any reports that have been lodged against this link by... stewards? (Can't find an announcement of this as of 20190908)
array | $stewardReports |
|
protected |
Set whether or not this link is stickied at the top of the subreddit
bool | $stickied |
|
protected |
Set the name of the subreddit this link resides in
string | $subreddit |
|
protected |
Set the Reddit internal "thing" fullname of the subreddit this link resides in, e.g. "t5_2qi1v"
string | $subredditId |
|
protected |
Set the name of the subreddit this link resides in, with its relative path e.g. "r/funny", or "u/joe" for user profile subreddits
string | $subredditNamePrefixed |
|
protected |
Set the number of subscribers in the subreddit where this link resides
int | $subredditSubscribers |
|
protected |
Set the type of access control enforced on the subreddit where this link resides. This should be one of ['public', 'restricted', 'private', 'employees_only']
string | $subredditType |
|
protected |
Set the suggested sort order for comments on this link, if any
string | $suggestedSort |
|
protected |
Set the URL to the thumbnail image for this link, if any
string | $thumbnail |
|
protected |
Set the thumbnail height pixel value, if any
type | $thumbnailHeight |
|
protected |
Set the thumbnail width pixel value, if any
type | $thumbnailWidth |
|
protected |
Set this link's title
string | $title |
|
protected |
Set the total number of awards (gold, platinum, etc.) this link has received
int | $totalAwardsReceived |
|
protected |
Set the number of upvotes that have been recorded on this link
int | $ups |
|
protected |
Set the URL to the target of this link.
string | $url |
|
protected |
Set an array defining any reports that have been lodged against this link by users. (Reports from moderators are stored separately in mod_reports.)
array | $userReports |
|
protected |
Set the number of times this link has been viewed.
int | $viewCount |
|
protected |
Set whether or not the currently authenticated user has visited this link.
bool | $visited |
|
protected |
Set the advertising whitelist status for this link, if set. This indicates which types of ads are eligible to be displayed.
string | $whitelistStatus |
|
protected |
Set the numeric whitelist status key, if any. A text version of the corresponding whitelist status is available in getWhitelistStatus()
int | $wls |