![]() |
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 | |
Listings (string appId, string appSecret, string refreshToken, string accessToken, ref RestClient restClient, string deviceId=null, string userAgent=null) | |
object | TrendingSubreddits () |
Return a list of trending subreddits, link to the comment in r/trendingsubreddits, and the comment count of that link. More... | |
PostContainer | Best (CategorizedSrListingInput categorizedSrListingInput) |
This endpoint is a listing. More... | |
PostContainer | GetByNames (string names) |
Get a listing of links by fullname. names is a list of fullnames for links separated by commas or spaces. More... | |
CommentContainer | GetComments (string article, ListingsGetCommentsInput listingsGetCommentsInput, string subreddit=null) |
Get the comment tree for a given Link article. If supplied, comment is the ID36 of a comment in the comment tree for article. This comment will be the (highlighted) focal point of the returned view and context will be the number of parents shown. depth is the maximum depth of subtrees in the thread. limit is the maximum number of comments to return. See also: /api/morechildren and /api/comment. More... | |
PostContainer | GetPost (string article, ListingsGetCommentsInput listingsGetCommentsInput, string subreddit=null) |
Get information on a given link via the comments endpoint. More... | |
List< PostContainer > | GetDuplicates (string article, ListingsGetDuplicatesInput listingsGetDuplicatesInput) |
Return a list of other submissions of the same URL This endpoint is a listing. More... | |
PostContainer | Hot (ListingsHotInput listingsHotInput, string subreddit=null) |
This endpoint is a listing. More... | |
PostContainer | New (CategorizedSrListingInput categorizedSrListingInput, string subreddit=null) |
This endpoint is a listing. More... | |
List< PostContainer > | Random (string subreddit=null) |
The Serendipity button More... | |
PostContainer | Rising (CategorizedSrListingInput categorizedSrListingInput, string subreddit=null) |
This endpoint is a listing. More... | |
PostContainer | Top (TimedCatSrListingInput timedCatSrListingInput, string subreddit=null) |
This endpoint is a listing. More... | |
PostContainer | Controversial (TimedCatSrListingInput timedCatSrListingInput, string subreddit=null) |
This endpoint is a listing. 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.Listings.Listings | ( | string | appId, |
string | appSecret, | ||
string | refreshToken, | ||
string | accessToken, | ||
ref RestClient | restClient, | ||
string | deviceId = null , |
||
string | userAgent = null |
||
) |
PostContainer Reddit.Models.Listings.Best | ( | CategorizedSrListingInput | categorizedSrListingInput | ) |
This endpoint is a listing.
categorizedSrListingInput | A valid CategorizedSrListingInput instance |
PostContainer Reddit.Models.Listings.Controversial | ( | TimedCatSrListingInput | timedCatSrListingInput, |
string | subreddit = null |
||
) |
This endpoint is a listing.
timedCatSrListingInput | A valid TimedCatSrListingInput instance |
subreddit | The subreddit with the listing |
PostContainer Reddit.Models.Listings.GetByNames | ( | string | names | ) |
Get a listing of links by fullname. names is a list of fullnames for links separated by commas or spaces.
names | A comma-separated list of link fullnames |
CommentContainer Reddit.Models.Listings.GetComments | ( | string | article, |
ListingsGetCommentsInput | listingsGetCommentsInput, | ||
string | subreddit = null |
||
) |
Get the comment tree for a given Link article. If supplied, comment is the ID36 of a comment in the comment tree for article. This comment will be the (highlighted) focal point of the returned view and context will be the number of parents shown. depth is the maximum depth of subtrees in the thread. limit is the maximum number of comments to return. See also: /api/morechildren and /api/comment.
article | ID36 of a link |
listingsGetCommentsInput | A valid ListingsGetCommentsInput instance |
subreddit | The subreddit with the article |
List<PostContainer> Reddit.Models.Listings.GetDuplicates | ( | string | article, |
ListingsGetDuplicatesInput | listingsGetDuplicatesInput | ||
) |
Return a list of other submissions of the same URL This endpoint is a listing.
article | The base 36 ID of a Link |
listingsGetDuplicatesInput | A valid ListingsGetDuplicatesInput instance |
PostContainer Reddit.Models.Listings.GetPost | ( | string | article, |
ListingsGetCommentsInput | listingsGetCommentsInput, | ||
string | subreddit = null |
||
) |
Get information on a given link via the comments endpoint.
article | ID36 of a link |
listingsGetCommentsInput | A valid ListingsGetCommentsInput instance |
subreddit | The subreddit with the article |
PostContainer Reddit.Models.Listings.Hot | ( | ListingsHotInput | listingsHotInput, |
string | subreddit = null |
||
) |
This endpoint is a listing.
listingsHotInput | A valid ListingsHotInput instance |
subreddit | The subreddit with the listing |
PostContainer Reddit.Models.Listings.New | ( | CategorizedSrListingInput | categorizedSrListingInput, |
string | subreddit = null |
||
) |
This endpoint is a listing.
categorizedSrListingInput | A valid CategorizedSrListingInput instance |
subreddit | The subreddit with the listing |
List<PostContainer> Reddit.Models.Listings.Random | ( | string | subreddit = null | ) |
The Serendipity button
subreddit | The subreddit from which to retrieve the random listing |
PostContainer Reddit.Models.Listings.Rising | ( | CategorizedSrListingInput | categorizedSrListingInput, |
string | subreddit = null |
||
) |
This endpoint is a listing.
categorizedSrListingInput | A valid CategorizedSrListingInput instance |
subreddit | The subreddit with the listing |
PostContainer Reddit.Models.Listings.Top | ( | TimedCatSrListingInput | timedCatSrListingInput, |
string | subreddit = null |
||
) |
This endpoint is a listing.
timedCatSrListingInput | A valid TimedCatSrListingInput instance |
subreddit | The subreddit with the listing |
object Reddit.Models.Listings.TrendingSubreddits | ( | ) |
Return a list of trending subreddits, link to the comment in r/trendingsubreddits, and the comment count of that link.