public Search ( System.DateTime from, System.DateTime to, Sorting sortE = Sorting.New ) : Listing |
||
from | System.DateTime | |
to | System.DateTime | |
sortE | Sorting | |
return | Listing |
private void HandleManualSubmission(Subreddit subreddit, Post post) { _log.Info($"Post was manually submitted \"{post.Title}\" to /r/{subreddit.Name}. Verifying."); var postUrl = PostHelper.Url(post); var posts = subreddit.Search($"url:{postUrl}"); var postSubmission = post.Integration.Reddit.GetPostSubmissionForSubreddit(subreddit.Name); if (posts.Any()) { _log.Info($"Post \"{post.Title}\" found in /r/{subreddit.Name}."); postSubmission.Status = SubmissionStatus.Submitted; return; } postSubmission.Attempts++; _log.Warn($"Post \"{post.Title}\" not found in /r/{subreddit.Name}."); if (postSubmission.Attempts >= 3) { postSubmission.Status = SubmissionStatus.ManualSubmissionFailure; postSubmission.Attempts = 0; } }