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.Listings Class Reference
Inheritance diagram for Reddit.Models.Listings:
Reddit.Models.BaseModel Reddit.Models.Internal.Request

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< PostContainerGetDuplicates (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< PostContainerRandom (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...
 
- 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

◆ Listings()

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

Member Function Documentation

◆ Best()

PostContainer Reddit.Models.Listings.Best ( CategorizedSrListingInput  categorizedSrListingInput)

This endpoint is a listing.

Parameters
categorizedSrListingInputA valid CategorizedSrListingInput instance
Returns
A list of Reddit posts.

◆ Controversial()

PostContainer Reddit.Models.Listings.Controversial ( TimedCatSrListingInput  timedCatSrListingInput,
string  subreddit = null 
)

This endpoint is a listing.

Parameters
timedCatSrListingInputA valid TimedCatSrListingInput instance
subredditThe subreddit with the listing
Returns
A list of Reddit posts.

◆ GetByNames()

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.

Parameters
namesA comma-separated list of link fullnames
Returns
A list of Reddit posts.

◆ GetComments()

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.

Parameters
articleID36 of a link
listingsGetCommentsInputA valid ListingsGetCommentsInput instance
subredditThe subreddit with the article
Returns
A post and comments tree.

◆ GetDuplicates()

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.

Parameters
articleThe base 36 ID of a Link
listingsGetDuplicatesInputA valid ListingsGetDuplicatesInput instance
Returns
A list of matching posts.

◆ GetPost()

PostContainer Reddit.Models.Listings.GetPost ( string  article,
ListingsGetCommentsInput  listingsGetCommentsInput,
string  subreddit = null 
)

Get information on a given link via the comments endpoint.

Parameters
articleID36 of a link
listingsGetCommentsInputA valid ListingsGetCommentsInput instance
subredditThe subreddit with the article
Returns
A post and comments tree.

◆ Hot()

PostContainer Reddit.Models.Listings.Hot ( ListingsHotInput  listingsHotInput,
string  subreddit = null 
)

This endpoint is a listing.

Parameters
listingsHotInputA valid ListingsHotInput instance
subredditThe subreddit with the listing
Returns
A list of Reddit posts.

◆ New()

PostContainer Reddit.Models.Listings.New ( CategorizedSrListingInput  categorizedSrListingInput,
string  subreddit = null 
)

This endpoint is a listing.

Parameters
categorizedSrListingInputA valid CategorizedSrListingInput instance
subredditThe subreddit with the listing
Returns
A list of Reddit posts.

◆ Random()

List<PostContainer> Reddit.Models.Listings.Random ( string  subreddit = null)

The Serendipity button

Parameters
subredditThe subreddit from which to retrieve the random listing
Returns
A random listing.

◆ Rising()

PostContainer Reddit.Models.Listings.Rising ( CategorizedSrListingInput  categorizedSrListingInput,
string  subreddit = null 
)

This endpoint is a listing.

Parameters
categorizedSrListingInputA valid CategorizedSrListingInput instance
subredditThe subreddit with the listing
Returns
A list of Reddit posts.

◆ Top()

PostContainer Reddit.Models.Listings.Top ( TimedCatSrListingInput  timedCatSrListingInput,
string  subreddit = null 
)

This endpoint is a listing.

Parameters
timedCatSrListingInputA valid TimedCatSrListingInput instance
subredditThe subreddit with the listing
Returns
A list of Reddit posts.

◆ TrendingSubreddits()

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.

Returns
(TODO - Untested)

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