/// <summary> /// Returns the list of images in the Main gallery in the given section and with the given sort method /// </summary> /// <param name="section">The section to get the images from.</param> /// <param name="sorting">The sorting method to use to sort the returned images. Default is the viral sorting method.</param> /// <param name="page">The page number to return images from. Default is the first page (0).</param> /// <returns>The list of images in the chosen gallery</returns> public async Task <ImgurGalleryImageList> GalleryDetailsAsync(GallerySection section, GallerySort sorting = GallerySort.viral, int page = 0) { string responseString = await GetAnonymousImgurDataAsync(ImgurEndpoints.Gallery(section, sorting, page)); return(await Task.Run(() => JsonConvert.DeserializeObject <ImgurGalleryImageList>(responseString, _defaultSerializerSettings))); }