Пример #1
0
        public async Task <Dictionary <string, List <RedditSubmission> > > GetSubsAsync(string domain)
        {
            Dictionary <string, List <RedditSubmission> > result = new Dictionary <string, List <RedditSubmission> >();
            var popular = _reddit.GetPopularSubreddits().ToList();

            foreach (var sub in popular)
            {
                var posts = await ObtainTopAsync(sub.Name, domain, TimePeriod.Day, false, false);

                if (posts.Count >= 10)
                {
                    result.Add(sub.Name, posts);
                }
            }
            return(result);
        }