Skip to content

Commit ae4a7c6

Browse files
committed
add ignore/unignore reports to Post and Comment
1 parent 9ee3c85 commit ae4a7c6

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

RedditSharp/Things/Comment.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ public class Comment : VotableThing
1919
private const string DelUrl = "/api/del";
2020
private const string ApproveUrl = "/api/approve";
2121
private const string SetAsReadUrl = "/api/read_message";
22+
private const string IgnoreReportsUrl = "/api/ignore_reports";
23+
private const string UnIgnoreReportsUrl = "/api/unignore_reports";
2224

2325
[JsonIgnore]
2426
private Reddit Reddit { get; set; }
@@ -239,6 +241,16 @@ public void Del()
239241
var data = SimpleAction(DelUrl);
240242
}
241243

244+
public void IgnoreReports()
245+
{
246+
var data = SimpleAction(IgnoreReportsUrl);
247+
}
248+
249+
public void UnIgnoreReports()
250+
{
251+
var data = SimpleAction(UnIgnoreReportsUrl);
252+
}
253+
242254
public void Remove()
243255
{
244256
RemoveImpl(false);

RedditSharp/Things/Post.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ public class Post : VotableThing
2525
private const string UnmarkNSFWUrl = "/api/unmarknsfw";
2626
private const string ContestModeUrl = "/api/set_contest_mode";
2727
private const string StickyModeUrl = "/api/set_subreddit_sticky";
28+
private const string IgnoreReportsUrl = "/api/ignore_reports";
29+
private const string UnIgnoreReportsUrl = "/api/unignore_reports";
2830

2931
[JsonIgnore]
3032
private Reddit Reddit { get; set; }
@@ -267,6 +269,16 @@ public void Unhide()
267269
var data = SimpleAction(UnhideUrl);
268270
}
269271

272+
public void IgnoreReports()
273+
{
274+
var data = SimpleAction(IgnoreReportsUrl);
275+
}
276+
277+
public void UnIgnoreReports()
278+
{
279+
var data = SimpleAction(UnIgnoreReportsUrl);
280+
}
281+
270282
public void MarkNSFW()
271283
{
272284
var data = SimpleAction(MarkNSFWUrl);

0 commit comments

Comments
 (0)