GetMemesSubGalleryAsync() public method

View images for memes subgallery.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public GetMemesSubGalleryAsync ( MemesGallerySortOrder sort = MemesGallerySortOrder.Viral, TimeWindow window = TimeWindow.Week, int page = null ) : Task>
sort MemesGallerySortOrder The order that the gallery should be sorted by. Default: Viral
window TimeWindow The time period that should be used in filtering requests. Default: Week
page int The data paging number. Default: null
return Task>
        public async Task GetMemesSubGalleryAsync_DefaultParameters_Any()
        {
            var mockUrl = "https://api.imgur.com/3/g/memes/viral/week/";
            var mockResponse = new HttpResponseMessage(HttpStatusCode.OK)
            {
                Content = new StringContent(MockGalleryEndpointResponses.GetMemesSubGallery)
            };

            var client = new ImgurClient("123", "1234");
            var endpoint = new GalleryEndpoint(client,
                new HttpClient(new MockHttpMessageHandler(mockUrl, mockResponse)));
            var gallery = await endpoint.GetMemesSubGalleryAsync().ConfigureAwait(false);

            Assert.True(gallery.Any());
        }
        public async Task GetGalleryAsync_WithTopYearPage7_Any()
        {
            var mockUrl = "https://api.imgur.com/3/g/memes/top/year/7";
            var mockResponse = new HttpResponseMessage(HttpStatusCode.OK)
            {
                Content = new StringContent(MockGalleryEndpointResponses.GetMemesSubGallery)
            };

            var client = new ImgurClient("123", "1234");
            var endpoint = new GalleryEndpoint(client,
                new HttpClient(new MockHttpMessageHandler(mockUrl, mockResponse)));
            var gallery =
                await
                    endpoint.GetMemesSubGalleryAsync(MemesGallerySortOrder.Top, TimeWindow.Year, 7)
                        .ConfigureAwait(false);

            Assert.True(gallery.Any());
        }