![]() |
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.
|
Public Member Functions | |
LinksAndComments (string appId, string appSecret, string refreshToken, string accessToken, ref RestClient restClient, string deviceId=null, string userAgent=null) | |
T | 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< PostResultContainer > | EditUserTextAsync (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< CommentResultContainer > | EditUserTextCommentAsync (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< JQueryReturn > | 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). 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< GenericContainer > | 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. 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< GenericContainer > | 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. 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< GenericContainer > | 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. 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< PostResultShortContainer > | 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. 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... | |
![]() | |
BaseModel (string appId, string appSecret, string refreshToken, string accessToken, ref RestClient restClient, string deviceId=null, string userAgent=null) | |
string | Sr (string subreddit) |
![]() | |
Request (string appId, string appSecret, string refreshToken, string accessToken, ref RestClient restClient, string deviceId=null, string userAgent=null) | |
T | 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 | |
![]() | |
virtual void | OnTokenUpdated (TokenUpdateEventArgs e) |
virtual void | OnRequestsUpdated (RequestsUpdateEventArgs e) |
![]() | |
EventHandler< TokenUpdateEventArgs > | TokenUpdated |
EventHandler< RequestsUpdateEventArgs > | RequestsUpdated |
Reddit.Models.LinksAndComments.LinksAndComments | ( | string | appId, |
string | appSecret, | ||
string | refreshToken, | ||
string | accessToken, | ||
ref RestClient | restClient, | ||
string | deviceId = null , |
||
string | userAgent = null |
||
) |
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.
linksAndCommentsThingInput | A valid LinksAndCommentsThingInput instance |
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.
linksAndCommentsThingInput | A valid LinksAndCommentsThingInput instance |
void Reddit.Models.LinksAndComments.Delete | ( | string | id | ) |
Delete a Link or Comment.
id | fullname of a thing created by the user |
async Task Reddit.Models.LinksAndComments.DeleteAsync | ( | string | id | ) |
Delete a Link or Comment asynchronously.
id | fullname of a thing created by the user |
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.
linksAndCommentsThingInput | A valid LinksAndCommentsThingInput instance |
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.
linksAndCommentsThingInput | A valid LinksAndCommentsThingInput instance |
CommentResultContainer Reddit.Models.LinksAndComments.EditUserTextComment | ( | LinksAndCommentsThingInput | linksAndCommentsThingInput | ) |
Edit the body text of a comment. the thing_id is the fullname of a comment.
linksAndCommentsThingInput | A valid LinksAndCommentsThingInput instance |
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.
linksAndCommentsThingInput | A valid LinksAndCommentsThingInput instance |
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.
id | A comma-separated list of link fullnames |
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.
id | A comma-separated list of link fullnames |
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.
id | A comma-separated list of thing fullnames |
subreddit | The subreddit with the listing |
loadReplies | The Info endpoint doesn't include replies; if loadReplies is true, an additional API call will be triggered to retrieve the replies (default: true) |
void Reddit.Models.LinksAndComments.Lock | ( | string | id | ) |
Lock a link. Prevents a post from receiving new comments. See also: /api/unlock.
id | fullname of a link |
async Task Reddit.Models.LinksAndComments.LockAsync | ( | string | id | ) |
Lock a link asynchronously. Prevents a post from receiving new comments. See also: /api/unlock.
id | fullname of a link |
void Reddit.Models.LinksAndComments.MarkNSFW | ( | string | id | ) |
Mark a link NSFW. See also: /api/unmarknsfw.
id | fullname of a thing |
async Task Reddit.Models.LinksAndComments.MarkNSFWAsync | ( | string | id | ) |
Mark a link NSFW asynchronously. See also: /api/unmarknsfw.
id | fullname of a thing |
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.
linksAndCommentsMoreChildrenInput | A valid LinksAndCommentsMoreChildrenInput instance |
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).
linksAndCommentsReportInput | A valid LinksAndCommentsReportInput instance |
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).
linksAndCommentsReportInput | A valid LinksAndCommentsReportInput instance |
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.
linksAndCommentsSaveInput | A valid LinksAndCommentsSaveInput instance |
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.
linksAndCommentsSaveInput | A valid LinksAndCommentsSaveInput instance |
object Reddit.Models.LinksAndComments.SavedCategories | ( | ) |
Get a list of categories in which things are currently saved. See also: /api/save.
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.
linksAndCommentsStateInput | a valid LinksAndCommentsStateInput instance |
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.
linksAndCommentsStateInput | a valid LinksAndCommentsStateInput instance |
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.
linksAndCommentsStateInput | a valid LinksAndCommentsStateInput instance |
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.
linksAndCommentsStateInput | a valid LinksAndCommentsStateInput instance |
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.
linksAndCommentsStickyInput | A valid LinksAndCommentsStickyInput instance |
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.
linksAndCommentsStickyInput | A valid LinksAndCommentsStickyInput instance |
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.
linksAndCommentsSuggestedSortInput | A valid LinksAndCommentsSuggestedSortInput instance |
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.
linksAndCommentsSuggestedSortInput | A valid LinksAndCommentsSuggestedSortInput instance |
void Reddit.Models.LinksAndComments.Spoiler | ( | string | id | ) |
Spoiler.
id | fullname of a link |
async Task Reddit.Models.LinksAndComments.SpoilerAsync | ( | string | id | ) |
Asynchronous spoiler.
id | fullname of a link |
object Reddit.Models.LinksAndComments.StoreVisits | ( | string | links | ) |
*Requires a subscription to [reddit premium]
links | A comma-separated list of link fullnames |
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.
linksAndCommentsSubmitInput | A valid LinksAndCommentsSubmitInput instance |
gRecaptchaResponse |
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.
linksAndCommentsSubmitInput | A valid LinksAndCommentsSubmitInput instance |
gRecaptchaResponse |
void Reddit.Models.LinksAndComments.Unhide | ( | string | id | ) |
Unhide a link.
id | A comma-separated list of link fullnames |
async Task Reddit.Models.LinksAndComments.UnhideAsync | ( | string | id | ) |
Unhide a link asynchronously.
id | A comma-separated list of link fullnames |
void Reddit.Models.LinksAndComments.Unlock | ( | string | id | ) |
Unlock a link. Allows a post to receive new comments. See also: /api/lock.
id | fullname of a link |
async Task Reddit.Models.LinksAndComments.UnlockAsync | ( | string | id | ) |
Unlock a link asynchronously. Allows a post to receive new comments. See also: /api/lock.
id | A comma-separated list of link fullnames |
void Reddit.Models.LinksAndComments.UnmarkNSFW | ( | string | id | ) |
Remove the NSFW marking from a link. See also: /api/marknsfw.
id | fullname of a thing |
async Task Reddit.Models.LinksAndComments.UnmarkNSFWAsync | ( | string | id | ) |
Remove the NSFW marking from a link asynchronously. See also: /api/marknsfw.
id | fullname of a thing |
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.
id | fullname of a thing |
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.
id | fullname of a thing |
void Reddit.Models.LinksAndComments.Unspoiler | ( | string | id | ) |
Remove spoiler.
id | fullname of a link |
async Task Reddit.Models.LinksAndComments.UnspoilerAsync | ( | string | id | ) |
Remove spoiler asynchronously.
id | fullname of a link |
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.
linksAndCommentsVoteInput | A valid LinksAndCommentsVoteInput instance |
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.
linksAndCommentsVoteInput | A valid LinksAndCommentsVoteInput instance |