Skip to content

Commit 7280323

Browse files
committed
Add get 'rising' posts
1 parent c89e5ac commit 7280323

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

RedditSharp/Things/Subreddit.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public class Subreddit : Thing
1414
private const string SubredditPostUrl = "/r/{0}.json";
1515
private const string SubredditNewUrl = "/r/{0}/new.json?sort=new";
1616
private const string SubredditHotUrl = "/r/{0}/hot.json";
17+
private const string SubredditRisingUrl = "/r/{0}/rising.json";
1718
private const string SubredditTopUrl = "/r/{0}/top.json?t={1}";
1819
private const string SubscribeUrl = "/api/subscribe";
1920
private const string GetSettingsUrl = "/r/{0}/about/edit.json";
@@ -154,8 +155,17 @@ public Listing<Post> Hot
154155
return new Listing<Post>(Reddit, "/.json", WebAgent);
155156
return new Listing<Post>(Reddit, string.Format(SubredditHotUrl, Name), WebAgent);
156157
}
157-
}
158-
158+
}
159+
public Listing<Post> Rising
160+
{
161+
get
162+
{
163+
if (Name == "/")
164+
return new Listing<Post>(Reddit, "/.json", WebAgent);
165+
return new Listing<Post>(Reddit, string.Format(SubredditRisingUrl, Name), WebAgent);
166+
}
167+
}
168+
159169
public Listing<VotableThing> ModQueue
160170
{
161171
get

0 commit comments

Comments
 (0)