public void CheckAction(Models.Account user, DateTime lastCheck)
        {
            RedditAPI api = _redditService.GetApi(_redditService.GetToken(user));

            var comments = api.Account.Me.CommentHistory();

            for (int i = 0; i < comments.Count; i++)
            {
                var replies = comments[i].Replies;

                for (int j = 0; j < replies.Count; j++)
                {
                    if (replies[j].Created > lastCheck)
                    {
                        _newReplies.Add(replies[j]);
                    }
                }
            }
        }
Esempio n. 2
0
        public void CheckAction(Models.Account user, DateTime lastCheck)
        {
            RedditAPI api = _redditService.GetApi(_redditService.GetToken(user));

            var subreddits = api.Account.MySubscribedSubreddits();

            for (int i = 0; i < subreddits.Count; i++)
            {
                var risingPosts = subreddits[i].Posts.Top;

                for (int j = 0; j < risingPosts.Count; j++)
                {
                    if (risingPosts[j].Created > lastCheck)
                    {
                        _newTopPosts.Add(risingPosts[j]);
                    }
                }
            }
        }