static public String GetMainGallery(MainGallerySection section, MainGallerySort sort, int page) { return(String.Format(_maingallery, Utilities.convertToString(section), Utilities.convertToString(sort), page)); }
/// <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> GetMainGalleryImagesAsync(MainGallerySection section, MainGallerySort sorting = MainGallerySort.viral, int page = 0) { String responseString = await GetAnonymousImgurDataAsync(ImgurEndpoints.GetMainGallery(section, sorting, page)); return(await JsonConvert.DeserializeObjectAsync <ImgurGalleryImageList>(responseString, _defaultSerializerSettings)); }