Exemple #1
0
        private static IAsyncEnumerable <string?> GetPostUrls(bool safeMode, string tags, int count)
        {
            var client = new SodiumClient(safeMode, UserAgent);
            var urls   = client.GetPostsAsync(tags, count)
                         .Select(p => p.File.Url?.AbsoluteUri)
                         .Where(u => !string.IsNullOrWhiteSpace(u));

            return(urls);
        }
Exemple #2
0
        private static async Task Main()
        {
            var client = new SodiumClient(true);
            var posts  = client.GetPostsAsync("on_glass fav:d3r_5h06un", 150);

            await foreach (var post in posts)
            {
                Console.WriteLine(post.File.Url?.AbsoluteUri);
            }
        }