Esempio n. 1
0
        public static IEnumerable <List <Comment> > EnumerateUserCommentsBatchedTimeDescendingLimit1000ish(this RedditClient client, string username)
        {
            var user          = client.User(username);
            var afterFullName = "";

            while (true)
            {
                var comments = user.GetCommentHistory(after: afterFullName, limit: 100);
                if (comments.Count == 0)
                {
                    break;
                }

                yield return(comments);

                afterFullName = comments[^ 1].Fullname;