Reddit.NET  1.5
Reddit.NET is a .NET Standard library that provides easy access to the Reddit API with virtually no boilerplate code required.
Reddit.Models.LinksAndComments Class Reference
Inheritance diagram for Reddit.Models.LinksAndComments:
Reddit.Models.BaseModel Reddit.Models.Internal.Request

Public Member Functions

 LinksAndComments (string appId, string appSecret, string refreshToken, string accessToken, ref RestClient restClient, string deviceId=null, string userAgent=null)
 
Comment< T > (LinksAndCommentsThingInput linksAndCommentsThingInput)
 Submit a new comment or reply to a message. parent is the fullname of the thing being replied to. Its value changes the kind of object created by this request: the fullname of a Link: a top-level comment in that Link's thread. (requires submit scope) the fullname of a Comment: a comment reply to that comment. (requires submit scope) the fullname of a Message: a message reply to that message. (requires privatemessages scope) text should be the raw markdown body of the comment or message. To start a new message thread, use /api/compose. the thing_id is the fullname of the parent thing. More...
 
async Task< T > CommentAsync< T > (LinksAndCommentsThingInput linksAndCommentsThingInput)
 Asynchronously submit a new comment or reply to a message. parent is the fullname of the thing being replied to. Its value changes the kind of object created by this request: the fullname of a Link: a top-level comment in that Link's thread. (requires submit scope) the fullname of a Comment: a comment reply to that comment. (requires submit scope) the fullname of a Message: a message reply to that message. (requires privatemessages scope) text should be the raw markdown body of the comment or message. To start a new message thread, use /api/compose. the thing_id is the fullname of the parent thing. More...
 
void Delete (string id)
 Delete a Link or Comment. More...
 
async Task DeleteAsync (string id)
 Delete a Link or Comment asynchronously. More...
 
PostResultContainer EditUserText (LinksAndCommentsThingInput linksAndCommentsThingInput)
 Edit the body text of a self-post. the thing_id is the fullname of a self post. More...
 
async Task< PostResultContainerEditUserTextAsync (LinksAndCommentsThingInput linksAndCommentsThingInput)
 Edit the body text of a self-post asynchronously. the thing_id is the fullname of a self post. More...
 
CommentResultContainer EditUserTextComment (LinksAndCommentsThingInput linksAndCommentsThingInput)
 Edit the body text of a comment. the thing_id is the fullname of a comment. More...
 
async Task< CommentResultContainerEditUserTextCommentAsync (LinksAndCommentsThingInput linksAndCommentsThingInput)
 Edit the body text of a comment asynchronously. the thing_id is the fullname of a comment. More...
 
void Hide (string id)
 Hide a link. This removes it from the user's default view of subreddit listings. See also: /api/unhide. More...
 
async Task HideAsync (string id)
 Hide a link asynchronously. This removes it from the user's default view of subreddit listings. See also: /api/unhide. More...
 
Info Info (string id, string subreddit=null, bool loadReplies=true)
 Return a listing of things specified by their fullnames. Only Links, Comments, and Subreddits are allowed. More...
 
void Lock (string id)
 Lock a link. Prevents a post from receiving new comments. See also: /api/unlock. More...
 
async Task LockAsync (string id)
 Lock a link asynchronously. Prevents a post from receiving new comments. See also: /api/unlock. More...
 
void MarkNSFW (string id)
 Mark a link NSFW. See also: /api/unmarknsfw. More...
 
async Task MarkNSFWAsync (string id)
 Mark a link NSFW asynchronously. See also: /api/unmarknsfw. More...
 
MoreChildren MoreChildren (LinksAndCommentsMoreChildrenInput linksAndCommentsMoreChildrenInput)
 Retrieve additional comments omitted from a base comment tree. When a comment tree is rendered, the most relevant comments are selected for display first. Remaining comments are stubbed out with "MoreComments" links. This API call is used to retrieve the additional comments represented by those stubs, up to 100 at a time. The two core parameters required are link and children. link is the fullname of the link whose comments are being fetched. children is a comma-delimited list of comment ID36s that need to be fetched. If id is passed, it should be the ID of the MoreComments object this call is replacing. This is needed only for the HTML UI's purposes and is optional otherwise. NOTE: you may only make one request at a time to this API endpoint. Higher concurrency will result in an error being returned. If limit_children is True, only return the children requested. More...
 
JQueryReturn Report (LinksAndCommentsReportInput linksAndCommentsReportInput)
 Report a link, comment or message. Reporting a thing brings it to the attention of the subreddit's moderators. Reporting a message sends it to a system for admin review. For links and comments, the thing is implicitly hidden as well (see /api/hide for details). More...
 
async Task< JQueryReturnReportAsync (LinksAndCommentsReportInput linksAndCommentsReportInput)
 Report a link, comment or message asynchronously. Reporting a thing brings it to the attention of the subreddit's moderators. Reporting a message sends it to a system for admin review. For links and comments, the thing is implicitly hidden as well (see /api/hide for details). More...
 
void Save (LinksAndCommentsSaveInput linksAndCommentsSaveInput)
 Save a link or comment. Saved things are kept in the user's saved listing for later perusal. See also: /api/unsave. More...
 
async Task SaveAsync (LinksAndCommentsSaveInput linksAndCommentsSaveInput)
 Save a link or comment asynchronously. Saved things are kept in the user's saved listing for later perusal. See also: /api/unsave. More...
 
object SavedCategories ()
 Get a list of categories in which things are currently saved. See also: /api/save. More...
 
void SendReplies (LinksAndCommentsStateInput linksAndCommentsStateInput)
 Enable or disable inbox replies for a link or comment. state is a boolean that indicates whether you are enabling or disabling inbox replies - true to enable, false to disable. id is the fullname of a thing created by the user. More...
 
async Task SendRepliesAsync (LinksAndCommentsStateInput linksAndCommentsStateInput)
 Enable or disable inbox replies for a link or comment asynchronously. state is a boolean that indicates whether you are enabling or disabling inbox replies - true to enable, false to disable. id is the fullname of a thing created by the user. More...
 
GenericContainer SetContestMode (LinksAndCommentsStateInput linksAndCommentsStateInput)
 Set or unset "contest mode" for a link's comments. state is a boolean that indicates whether you are enabling or disabling contest mode - true to enable, false to disable. More...
 
async Task< GenericContainerSetContestModeAsync (LinksAndCommentsStateInput linksAndCommentsStateInput)
 Set or unset "contest mode" for a link's comments asynchronously. state is a boolean that indicates whether you are enabling or disabling contest mode - true to enable, false to disable. More...
 
GenericContainer SetSubredditSticky (LinksAndCommentsStickyInput linksAndCommentsStickyInput)
 Set or unset a Link as the sticky in its subreddit. state is a boolean that indicates whether to sticky or unsticky this post - true to sticky, false to unsticky. The num argument is optional, and only used when stickying a post. It allows specifying a particular "slot" to sticky the post into, and if there is already a post stickied in that slot it will be replaced. If there is no post in the specified slot to replace, or num is None, the bottom-most slot will be used. More...
 
async Task< GenericContainerSetSubredditStickyAsync (LinksAndCommentsStickyInput linksAndCommentsStickyInput)
 Set or unset a Link as the sticky in its subreddit asynchronously. state is a boolean that indicates whether to sticky or unsticky this post - true to sticky, false to unsticky. The num argument is optional, and only used when stickying a post. It allows specifying a particular "slot" to sticky the post into, and if there is already a post stickied in that slot it will be replaced. If there is no post in the specified slot to replace, or num is None, the bottom-most slot will be used. More...
 
GenericContainer SetSuggestedSort (LinksAndCommentsSuggestedSortInput linksAndCommentsSuggestedSortInput)
 Set a suggested sort for a link. Suggested sorts are useful to display comments in a certain preferred way for posts. For example, casual conversation may be better sorted by new by default, or AMAs may be sorted by Q&A. A sort of an empty string clears the default sort. More...
 
async Task< GenericContainerSetSuggestedSortAsync (LinksAndCommentsSuggestedSortInput linksAndCommentsSuggestedSortInput)
 Set a suggested sort for a link asynchronously. Suggested sorts are useful to display comments in a certain preferred way for posts. For example, casual conversation may be better sorted by new by default, or AMAs may be sorted by Q&A. A sort of an empty string clears the default sort. More...
 
void Spoiler (string id)
 Spoiler. More...
 
async Task SpoilerAsync (string id)
 Asynchronous spoiler. More...
 
object StoreVisits (string links)
 *Requires a subscription to [reddit premium] More...
 
PostResultShortContainer Submit (LinksAndCommentsSubmitInput linksAndCommentsSubmitInput, string gRecaptchaResponse="")
 Submit a link to a subreddit. Submit will create a link or self-post in the subreddit sr with the title title. If kind is "link", then url is expected to be a valid URL to link to. Otherwise, text, if present, will be the body of the self-post unless richtext_json is present, in which case it will be converted into the body of the self-post. An error is thrown if both text and richtext_json are present. If a link with the same URL has already been submitted to the specified subreddit an error will be returned unless resubmit is true. extension is used for determining which view-type (e.g.json, compact etc.) to use for the redirect that is generated if the resubmit error occurs. More...
 
async Task< PostResultShortContainerSubmitAsync (LinksAndCommentsSubmitInput linksAndCommentsSubmitInput, string gRecaptchaResponse="")
 Submit a link to a subreddit asynchronously. Submit will create a link or self-post in the subreddit sr with the title title. If kind is "link", then url is expected to be a valid URL to link to. Otherwise, text, if present, will be the body of the self-post unless richtext_json is present, in which case it will be converted into the body of the self-post. An error is thrown if both text and richtext_json are present. If a link with the same URL has already been submitted to the specified subreddit an error will be returned unless resubmit is true. extension is used for determining which view-type (e.g.json, compact etc.) to use for the redirect that is generated if the resubmit error occurs. More...
 
void Unhide (string id)
 Unhide a link. More...
 
async Task UnhideAsync (string id)
 Unhide a link asynchronously. More...
 
void Unlock (string id)
 Unlock a link. Allows a post to receive new comments. See also: /api/lock. More...
 
async Task UnlockAsync (string id)
 Unlock a link asynchronously. Allows a post to receive new comments. See also: /api/lock. More...
 
void UnmarkNSFW (string id)
 Remove the NSFW marking from a link. See also: /api/marknsfw. More...
 
async Task UnmarkNSFWAsync (string id)
 Remove the NSFW marking from a link asynchronously. See also: /api/marknsfw. More...
 
void Unsave (string id)
 Unsave a link or comment. This removes the thing from the user's saved listings as well. See also: /api/save. More...
 
async Task UnsaveAsync (string id)
 Unsave a link or comment asynchronously. This removes the thing from the user's saved listings as well. See also: /api/save. More...
 
void Unspoiler (string id)
 Remove spoiler. More...
 
async Task UnspoilerAsync (string id)
 Remove spoiler asynchronously. More...
 
void Vote (LinksAndCommentsVoteInput linksAndCommentsVoteInput)
 Cast a vote on a thing. id should be the fullname of the Link or Comment to vote on. dir indicates the direction of the vote. Voting 1 is an upvote, -1 is a downvote, and 0 is equivalent to "un-voting" by clicking again on a highlighted arrow. Note: votes must be cast by humans. That is, API clients proxying a human's action one-for-one are OK, but bots deciding how to vote on content or amplifying a human's vote are not. See the reddit rules for more details on what constitutes vote cheating. More...
 
async Task VoteAsync (LinksAndCommentsVoteInput linksAndCommentsVoteInput)
 Cast a vote on a thing asynchronously. id should be the fullname of the Link or Comment to vote on. dir indicates the direction of the vote. Voting 1 is an upvote, -1 is a downvote, and 0 is equivalent to "un-voting" by clicking again on a highlighted arrow. Note: votes must be cast by humans. That is, API clients proxying a human's action one-for-one are OK, but bots deciding how to vote on content or amplifying a human's vote are not. See the reddit rules for more details on what constitutes vote cheating. More...
 
- Public Member Functions inherited from Reddit.Models.BaseModel
 BaseModel (string appId, string appSecret, string refreshToken, string accessToken, ref RestClient restClient, string deviceId=null, string userAgent=null)
 
string Sr (string subreddit)
 
- Public Member Functions inherited from Reddit.Models.Internal.Request
 Request (string appId, string appSecret, string refreshToken, string accessToken, ref RestClient restClient, string deviceId=null, string userAgent=null)
 
SendRequest< T > (string url, dynamic parameters, Method method=Method.GET, string contentType="application/x-www-form-urlencoded")
 
async Task< T > SendRequestAsync< T > (string url, dynamic parameters, Method method=Method.GET, string contentType="application/x-www-form-urlencoded")
 
RestRequest PrepareIDRequest (string path, string id, Method method=Method.POST)
 
RestRequest PrepareJSONRequest (string path, Method method=Method.POST)
 
RestRequest PrepareRequest (string url, Method method=Method.GET, string contentType="application/x-www-form-urlencoded")
 
RestRequest PrepareRequest (string url, Method method, List< Parameter > parameters, List< FileParameter > files, string contentType="application/x-www-form-urlencoded")
 
RestRequest PrepareRequest (RestRequest restRequest, string contentType="application/x-www-form-urlencoded")
 
string GetVersion ()
 
string ExecuteRequest (string url, Method method=Method.GET)
 
async Task< string > ExecuteRequestAsync (string url, Method method=Method.GET)
 
string ExecuteRequest (RestRequest restRequest)
 
async Task< string > ExecuteRequestAsync (RestRequest restRequest)
 
void UpdateAccessToken (string accessToken)
 
void UpdateRequests (List< DateTime > requests)
 
void AddParamIfNotNull (string name, dynamic value, ref RestRequest restRequest)
 

Additional Inherited Members

- Protected Member Functions inherited from Reddit.Models.Internal.Request
virtual void OnTokenUpdated (TokenUpdateEventArgs e)
 
virtual void OnRequestsUpdated (RequestsUpdateEventArgs e)
 
- Events inherited from Reddit.Models.Internal.Request
EventHandler< TokenUpdateEventArgsTokenUpdated
 
EventHandler< RequestsUpdateEventArgsRequestsUpdated
 

Constructor & Destructor Documentation

◆ LinksAndComments()

Reddit.Models.LinksAndComments.LinksAndComments ( string  appId,
string  appSecret,
string  refreshToken,
string  accessToken,
ref RestClient  restClient,
string  deviceId = null,
string  userAgent = null 
)

Member Function Documentation

◆ Comment< T >()

T Reddit.Models.LinksAndComments.Comment< T > ( LinksAndCommentsThingInput  linksAndCommentsThingInput)

Submit a new comment or reply to a message. parent is the fullname of the thing being replied to. Its value changes the kind of object created by this request: the fullname of a Link: a top-level comment in that Link's thread. (requires submit scope) the fullname of a Comment: a comment reply to that comment. (requires submit scope) the fullname of a Message: a message reply to that message. (requires privatemessages scope) text should be the raw markdown body of the comment or message. To start a new message thread, use /api/compose. the thing_id is the fullname of the parent thing.

Parameters
linksAndCommentsThingInputA valid LinksAndCommentsThingInput instance
Returns
A Reddit comment.

◆ CommentAsync< T >()

async Task<T> Reddit.Models.LinksAndComments.CommentAsync< T > ( LinksAndCommentsThingInput  linksAndCommentsThingInput)

Asynchronously submit a new comment or reply to a message. parent is the fullname of the thing being replied to. Its value changes the kind of object created by this request: the fullname of a Link: a top-level comment in that Link's thread. (requires submit scope) the fullname of a Comment: a comment reply to that comment. (requires submit scope) the fullname of a Message: a message reply to that message. (requires privatemessages scope) text should be the raw markdown body of the comment or message. To start a new message thread, use /api/compose. the thing_id is the fullname of the parent thing.

Parameters
linksAndCommentsThingInputA valid LinksAndCommentsThingInput instance
Returns
A Reddit comment.

◆ Delete()

void Reddit.Models.LinksAndComments.Delete ( string  id)

Delete a Link or Comment.

Parameters
idfullname of a thing created by the user

◆ DeleteAsync()

async Task Reddit.Models.LinksAndComments.DeleteAsync ( string  id)

Delete a Link or Comment asynchronously.

Parameters
idfullname of a thing created by the user

◆ EditUserText()

PostResultContainer Reddit.Models.LinksAndComments.EditUserText ( LinksAndCommentsThingInput  linksAndCommentsThingInput)

Edit the body text of a self-post. the thing_id is the fullname of a self post.

Parameters
linksAndCommentsThingInputA valid LinksAndCommentsThingInput instance
Returns
The modified post data.

◆ EditUserTextAsync()

async Task<PostResultContainer> Reddit.Models.LinksAndComments.EditUserTextAsync ( LinksAndCommentsThingInput  linksAndCommentsThingInput)

Edit the body text of a self-post asynchronously. the thing_id is the fullname of a self post.

Parameters
linksAndCommentsThingInputA valid LinksAndCommentsThingInput instance
Returns
The modified post data.

◆ EditUserTextComment()

CommentResultContainer Reddit.Models.LinksAndComments.EditUserTextComment ( LinksAndCommentsThingInput  linksAndCommentsThingInput)

Edit the body text of a comment. the thing_id is the fullname of a comment.

Parameters
linksAndCommentsThingInputA valid LinksAndCommentsThingInput instance
Returns
The modified comment data.

◆ EditUserTextCommentAsync()

async Task<CommentResultContainer> Reddit.Models.LinksAndComments.EditUserTextCommentAsync ( LinksAndCommentsThingInput  linksAndCommentsThingInput)

Edit the body text of a comment asynchronously. the thing_id is the fullname of a comment.

Parameters
linksAndCommentsThingInputA valid LinksAndCommentsThingInput instance
Returns
The modified comment data.

◆ Hide()

void Reddit.Models.LinksAndComments.Hide ( string  id)

Hide a link. This removes it from the user's default view of subreddit listings. See also: /api/unhide.

Parameters
idA comma-separated list of link fullnames

◆ HideAsync()

async Task Reddit.Models.LinksAndComments.HideAsync ( string  id)

Hide a link asynchronously. This removes it from the user's default view of subreddit listings. See also: /api/unhide.

Parameters
idA comma-separated list of link fullnames

◆ Info()

Info Reddit.Models.LinksAndComments.Info ( string  id,
string  subreddit = null,
bool  loadReplies = true 
)

Return a listing of things specified by their fullnames. Only Links, Comments, and Subreddits are allowed.

Parameters
idA comma-separated list of thing fullnames
subredditThe subreddit with the listing
loadRepliesThe Info endpoint doesn't include replies; if loadReplies is true, an additional API call will be triggered to retrieve the replies (default: true)
Returns
The requested listings.

◆ Lock()

void Reddit.Models.LinksAndComments.Lock ( string  id)

Lock a link. Prevents a post from receiving new comments. See also: /api/unlock.

Parameters
idfullname of a link

◆ LockAsync()

async Task Reddit.Models.LinksAndComments.LockAsync ( string  id)

Lock a link asynchronously. Prevents a post from receiving new comments. See also: /api/unlock.

Parameters
idfullname of a link

◆ MarkNSFW()

void Reddit.Models.LinksAndComments.MarkNSFW ( string  id)

Mark a link NSFW. See also: /api/unmarknsfw.

Parameters
idfullname of a thing

◆ MarkNSFWAsync()

async Task Reddit.Models.LinksAndComments.MarkNSFWAsync ( string  id)

Mark a link NSFW asynchronously. See also: /api/unmarknsfw.

Parameters
idfullname of a thing

◆ MoreChildren()

MoreChildren Reddit.Models.LinksAndComments.MoreChildren ( LinksAndCommentsMoreChildrenInput  linksAndCommentsMoreChildrenInput)

Retrieve additional comments omitted from a base comment tree. When a comment tree is rendered, the most relevant comments are selected for display first. Remaining comments are stubbed out with "MoreComments" links. This API call is used to retrieve the additional comments represented by those stubs, up to 100 at a time. The two core parameters required are link and children. link is the fullname of the link whose comments are being fetched. children is a comma-delimited list of comment ID36s that need to be fetched. If id is passed, it should be the ID of the MoreComments object this call is replacing. This is needed only for the HTML UI's purposes and is optional otherwise. NOTE: you may only make one request at a time to this API endpoint. Higher concurrency will result in an error being returned. If limit_children is True, only return the children requested.

Parameters
linksAndCommentsMoreChildrenInputA valid LinksAndCommentsMoreChildrenInput instance
Returns
The requested comments.

◆ Report()

JQueryReturn Reddit.Models.LinksAndComments.Report ( LinksAndCommentsReportInput  linksAndCommentsReportInput)

Report a link, comment or message. Reporting a thing brings it to the attention of the subreddit's moderators. Reporting a message sends it to a system for admin review. For links and comments, the thing is implicitly hidden as well (see /api/hide for details).

Parameters
linksAndCommentsReportInputA valid LinksAndCommentsReportInput instance
Returns
A return object indicating success.

◆ ReportAsync()

async Task<JQueryReturn> Reddit.Models.LinksAndComments.ReportAsync ( LinksAndCommentsReportInput  linksAndCommentsReportInput)

Report a link, comment or message asynchronously. Reporting a thing brings it to the attention of the subreddit's moderators. Reporting a message sends it to a system for admin review. For links and comments, the thing is implicitly hidden as well (see /api/hide for details).

Parameters
linksAndCommentsReportInputA valid LinksAndCommentsReportInput instance
Returns
A return object indicating success.

◆ Save()

void Reddit.Models.LinksAndComments.Save ( LinksAndCommentsSaveInput  linksAndCommentsSaveInput)

Save a link or comment. Saved things are kept in the user's saved listing for later perusal. See also: /api/unsave.

Parameters
linksAndCommentsSaveInputA valid LinksAndCommentsSaveInput instance

◆ SaveAsync()

async Task Reddit.Models.LinksAndComments.SaveAsync ( LinksAndCommentsSaveInput  linksAndCommentsSaveInput)

Save a link or comment asynchronously. Saved things are kept in the user's saved listing for later perusal. See also: /api/unsave.

Parameters
linksAndCommentsSaveInputA valid LinksAndCommentsSaveInput instance

◆ SavedCategories()

object Reddit.Models.LinksAndComments.SavedCategories ( )

Get a list of categories in which things are currently saved. See also: /api/save.

Returns
(TODO - Untested)

◆ SendReplies()

void Reddit.Models.LinksAndComments.SendReplies ( LinksAndCommentsStateInput  linksAndCommentsStateInput)

Enable or disable inbox replies for a link or comment. state is a boolean that indicates whether you are enabling or disabling inbox replies - true to enable, false to disable. id is the fullname of a thing created by the user.

Parameters
linksAndCommentsStateInputa valid LinksAndCommentsStateInput instance

◆ SendRepliesAsync()

async Task Reddit.Models.LinksAndComments.SendRepliesAsync ( LinksAndCommentsStateInput  linksAndCommentsStateInput)

Enable or disable inbox replies for a link or comment asynchronously. state is a boolean that indicates whether you are enabling or disabling inbox replies - true to enable, false to disable. id is the fullname of a thing created by the user.

Parameters
linksAndCommentsStateInputa valid LinksAndCommentsStateInput instance

◆ SetContestMode()

GenericContainer Reddit.Models.LinksAndComments.SetContestMode ( LinksAndCommentsStateInput  linksAndCommentsStateInput)

Set or unset "contest mode" for a link's comments. state is a boolean that indicates whether you are enabling or disabling contest mode - true to enable, false to disable.

Parameters
linksAndCommentsStateInputa valid LinksAndCommentsStateInput instance
Returns
A generic response object indicating any errors.

◆ SetContestModeAsync()

async Task<GenericContainer> Reddit.Models.LinksAndComments.SetContestModeAsync ( LinksAndCommentsStateInput  linksAndCommentsStateInput)

Set or unset "contest mode" for a link's comments asynchronously. state is a boolean that indicates whether you are enabling or disabling contest mode - true to enable, false to disable.

Parameters
linksAndCommentsStateInputa valid LinksAndCommentsStateInput instance
Returns
A generic response object indicating any errors.

◆ SetSubredditSticky()

GenericContainer Reddit.Models.LinksAndComments.SetSubredditSticky ( LinksAndCommentsStickyInput  linksAndCommentsStickyInput)

Set or unset a Link as the sticky in its subreddit. state is a boolean that indicates whether to sticky or unsticky this post - true to sticky, false to unsticky. The num argument is optional, and only used when stickying a post. It allows specifying a particular "slot" to sticky the post into, and if there is already a post stickied in that slot it will be replaced. If there is no post in the specified slot to replace, or num is None, the bottom-most slot will be used.

Parameters
linksAndCommentsStickyInputA valid LinksAndCommentsStickyInput instance
Returns
A generic response object indicating any errors.

◆ SetSubredditStickyAsync()

async Task<GenericContainer> Reddit.Models.LinksAndComments.SetSubredditStickyAsync ( LinksAndCommentsStickyInput  linksAndCommentsStickyInput)

Set or unset a Link as the sticky in its subreddit asynchronously. state is a boolean that indicates whether to sticky or unsticky this post - true to sticky, false to unsticky. The num argument is optional, and only used when stickying a post. It allows specifying a particular "slot" to sticky the post into, and if there is already a post stickied in that slot it will be replaced. If there is no post in the specified slot to replace, or num is None, the bottom-most slot will be used.

Parameters
linksAndCommentsStickyInputA valid LinksAndCommentsStickyInput instance
Returns
A generic response object indicating any errors.

◆ SetSuggestedSort()

GenericContainer Reddit.Models.LinksAndComments.SetSuggestedSort ( LinksAndCommentsSuggestedSortInput  linksAndCommentsSuggestedSortInput)

Set a suggested sort for a link. Suggested sorts are useful to display comments in a certain preferred way for posts. For example, casual conversation may be better sorted by new by default, or AMAs may be sorted by Q&A. A sort of an empty string clears the default sort.

Parameters
linksAndCommentsSuggestedSortInputA valid LinksAndCommentsSuggestedSortInput instance
Returns
A generic response object indicating any errors.

◆ SetSuggestedSortAsync()

async Task<GenericContainer> Reddit.Models.LinksAndComments.SetSuggestedSortAsync ( LinksAndCommentsSuggestedSortInput  linksAndCommentsSuggestedSortInput)

Set a suggested sort for a link asynchronously. Suggested sorts are useful to display comments in a certain preferred way for posts. For example, casual conversation may be better sorted by new by default, or AMAs may be sorted by Q&A. A sort of an empty string clears the default sort.

Parameters
linksAndCommentsSuggestedSortInputA valid LinksAndCommentsSuggestedSortInput instance
Returns
A generic response object indicating any errors.

◆ Spoiler()

void Reddit.Models.LinksAndComments.Spoiler ( string  id)

Spoiler.

Parameters
idfullname of a link

◆ SpoilerAsync()

async Task Reddit.Models.LinksAndComments.SpoilerAsync ( string  id)

Asynchronous spoiler.

Parameters
idfullname of a link

◆ StoreVisits()

object Reddit.Models.LinksAndComments.StoreVisits ( string  links)

*Requires a subscription to [reddit premium]

Parameters
linksA comma-separated list of link fullnames
Returns
(TODO - Untested)

◆ Submit()

PostResultShortContainer Reddit.Models.LinksAndComments.Submit ( LinksAndCommentsSubmitInput  linksAndCommentsSubmitInput,
string  gRecaptchaResponse = "" 
)

Submit a link to a subreddit. Submit will create a link or self-post in the subreddit sr with the title title. If kind is "link", then url is expected to be a valid URL to link to. Otherwise, text, if present, will be the body of the self-post unless richtext_json is present, in which case it will be converted into the body of the self-post. An error is thrown if both text and richtext_json are present. If a link with the same URL has already been submitted to the specified subreddit an error will be returned unless resubmit is true. extension is used for determining which view-type (e.g.json, compact etc.) to use for the redirect that is generated if the resubmit error occurs.

Parameters
linksAndCommentsSubmitInputA valid LinksAndCommentsSubmitInput instance
gRecaptchaResponse
Returns
An object containing the id, name, and URL of the newly created post.

◆ SubmitAsync()

async Task<PostResultShortContainer> Reddit.Models.LinksAndComments.SubmitAsync ( LinksAndCommentsSubmitInput  linksAndCommentsSubmitInput,
string  gRecaptchaResponse = "" 
)

Submit a link to a subreddit asynchronously. Submit will create a link or self-post in the subreddit sr with the title title. If kind is "link", then url is expected to be a valid URL to link to. Otherwise, text, if present, will be the body of the self-post unless richtext_json is present, in which case it will be converted into the body of the self-post. An error is thrown if both text and richtext_json are present. If a link with the same URL has already been submitted to the specified subreddit an error will be returned unless resubmit is true. extension is used for determining which view-type (e.g.json, compact etc.) to use for the redirect that is generated if the resubmit error occurs.

Parameters
linksAndCommentsSubmitInputA valid LinksAndCommentsSubmitInput instance
gRecaptchaResponse
Returns
An object containing the id, name, and URL of the newly created post.

◆ Unhide()

void Reddit.Models.LinksAndComments.Unhide ( string  id)

Unhide a link.

Parameters
idA comma-separated list of link fullnames

◆ UnhideAsync()

async Task Reddit.Models.LinksAndComments.UnhideAsync ( string  id)

Unhide a link asynchronously.

Parameters
idA comma-separated list of link fullnames

◆ Unlock()

void Reddit.Models.LinksAndComments.Unlock ( string  id)

Unlock a link. Allows a post to receive new comments. See also: /api/lock.

Parameters
idfullname of a link

◆ UnlockAsync()

async Task Reddit.Models.LinksAndComments.UnlockAsync ( string  id)

Unlock a link asynchronously. Allows a post to receive new comments. See also: /api/lock.

Parameters
idA comma-separated list of link fullnames

◆ UnmarkNSFW()

void Reddit.Models.LinksAndComments.UnmarkNSFW ( string  id)

Remove the NSFW marking from a link. See also: /api/marknsfw.

Parameters
idfullname of a thing

◆ UnmarkNSFWAsync()

async Task Reddit.Models.LinksAndComments.UnmarkNSFWAsync ( string  id)

Remove the NSFW marking from a link asynchronously. See also: /api/marknsfw.

Parameters
idfullname of a thing

◆ Unsave()

void Reddit.Models.LinksAndComments.Unsave ( string  id)

Unsave a link or comment. This removes the thing from the user's saved listings as well. See also: /api/save.

Parameters
idfullname of a thing

◆ UnsaveAsync()

async Task Reddit.Models.LinksAndComments.UnsaveAsync ( string  id)

Unsave a link or comment asynchronously. This removes the thing from the user's saved listings as well. See also: /api/save.

Parameters
idfullname of a thing

◆ Unspoiler()

void Reddit.Models.LinksAndComments.Unspoiler ( string  id)

Remove spoiler.

Parameters
idfullname of a link

◆ UnspoilerAsync()

async Task Reddit.Models.LinksAndComments.UnspoilerAsync ( string  id)

Remove spoiler asynchronously.

Parameters
idfullname of a link

◆ Vote()

void Reddit.Models.LinksAndComments.Vote ( LinksAndCommentsVoteInput  linksAndCommentsVoteInput)

Cast a vote on a thing. id should be the fullname of the Link or Comment to vote on. dir indicates the direction of the vote. Voting 1 is an upvote, -1 is a downvote, and 0 is equivalent to "un-voting" by clicking again on a highlighted arrow. Note: votes must be cast by humans. That is, API clients proxying a human's action one-for-one are OK, but bots deciding how to vote on content or amplifying a human's vote are not. See the reddit rules for more details on what constitutes vote cheating.

Parameters
linksAndCommentsVoteInputA valid LinksAndCommentsVoteInput instance

◆ VoteAsync()

async Task Reddit.Models.LinksAndComments.VoteAsync ( LinksAndCommentsVoteInput  linksAndCommentsVoteInput)

Cast a vote on a thing asynchronously. id should be the fullname of the Link or Comment to vote on. dir indicates the direction of the vote. Voting 1 is an upvote, -1 is a downvote, and 0 is equivalent to "un-voting" by clicking again on a highlighted arrow. Note: votes must be cast by humans. That is, API clients proxying a human's action one-for-one are OK, but bots deciding how to vote on content or amplifying a human's vote are not. See the reddit rules for more details on what constitutes vote cheating.

Parameters
linksAndCommentsVoteInputA valid LinksAndCommentsVoteInput instance

The documentation for this class was generated from the following file: