Class RedditService
Inheritance
System.Object
RedditService
Namespace: CommonBotLibrary.Services
Assembly: cs.temp.dll.dll
Syntax
public class RedditService : IWebpageService, ISearchable<IWebpage>
Methods
GetPostsAsync(String, Category, Int32)
Gets relevant posts from a subreddit.
Declaration
public Task<IEnumerable<Post>> GetPostsAsync(string subredditName = null, Category category = null, int limit = 50)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | subredditName | The name of the subreddit to fetch from, or the front page if null. |
| Category | category | What category posts should be retrieved from. |
| System.Int32 | limit | How many results should be retrieved. |
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<Post>> | A collection of relevant webpages indexed on a subreddit. |