private async Task <Collection <WallpapersResponse> > GetWallpapersBy(
            WallpaperAbyssMethod method,
            int?id,
            WallpaperAbyssInfoLevel infoLevel = WallpaperAbyssInfoLevel.One,
            WallpaperAbyssSort sort           = WallpaperAbyssSort.newest,
            int?page  = null,
            int?width = null,
            int?heigt = null,
            WallpaperAbyssOperator @operator  = WallpaperAbyssOperator.equal,
            WallpaperAbyssCheckLast checkLast = WallpaperAbyssCheckLast.Zero
            )
        {
            var arguments = new WallpaperAbyssArgumentsBuilder()
            {
                Auth      = _auth,
                Method    = method,
                ID        = id,
                InfoLevel = infoLevel,
                Sort      = sort,
                Page      = page,
                Width     = width,
                Height    = heigt,
                Operator  = @operator,
                CheckLast = checkLast
            };

            var result = await GeneralSearchAsync(arguments);

            return(result.ResponseObject.Wallpapers);
        }
        /// <summary>
        /// This method returns random Wallpapers.
        /// </summary>
        /// <param name="auth">Your authentication key.</param>
        /// <param name="count">Number of results (1-30).</param>
        /// <param name="infoLevel">The quantity of info returned for each wallpaper.</param>
        /// <returns></returns>
        public async Task <Collection <WallpapersResponse> > GetRandomWallpapersAsync(
            int count,
            WallpaperAbyssInfoLevel infoLevel = WallpaperAbyssInfoLevel.One
            )
        {
            if (count > 30)
            {
                count = 30;
            }
            if (count < 1)
            {
                count = 1;
            }

            var arguments = new WallpaperAbyssArgumentsBuilder()
            {
                Auth      = _auth,
                Method    = WallpaperAbyssMethod.random,
                Count     = count,
                InfoLevel = infoLevel
            };

            var result = await GeneralSearchAsync(arguments);

            return(result.ResponseObject.Wallpapers);
        }
        /// <summary>
        /// This method returns Wallpapers matching a given Search.
        /// </summary>
        /// <param name="term">	The search term used for the matching.</param>
        /// <param name="infoLevel">The quantity of info returned for each wallpaper.</param>
        /// <param name="Page">Page number, there are 30 wallpapers per page.</param>
        /// <param name="width">Get only wallpapers width a specific width.</param>
        /// <param name="height">Get only wallpapers width a specific height.</param>
        /// <param name="operator">The type of resolution filter, <= will be used with 'max', = with 'equal' and >= with 'min'.</param>
        /// <returns></returns>
        public async Task <Collection <WallpapersResponse> > Search(
            string term,
            WallpaperAbyssInfoLevel infoLevel = WallpaperAbyssInfoLevel.One,
            int?Page   = null,
            int?width  = null,
            int?height = null,
            WallpaperAbyssOperator @operator = WallpaperAbyssOperator.equal
            )
        {
            var arguments = new WallpaperAbyssArgumentsBuilder()
            {
                Auth      = _auth,
                Method    = WallpaperAbyssMethod.search,
                Term      = term,
                InfoLevel = infoLevel,
                Page      = Page,
                Width     = width,
                Height    = height,
                Operator  = @operator
            };

            var result = await GeneralSearchAsync(arguments);

            return(result.ResponseObject.Wallpapers);
        }
        /// <summary>
        /// This method returns sorted Wallpapers.
        /// </summary>
        /// <param name="sort">Way of sorting.</param>
        /// <param name="infoLevel">The quantity of info returned for each wallpaper.</param>
        /// <param name="page">Page number, there are 30 wallpapers per page (1-1000).</param>
        /// <param name="width">Get only wallpapers width a specific width.</param>
        /// <param name="height">Get only wallpapers width a specific height.</param>
        /// <param name="operator">The type of resolution filter, <= will be used with 'max', = with 'equal' and >= with 'min'.</param>
        /// <param name="checkLast">You can request an additional output letting you know if this is the last page of results for this set of parameters.</param>
        /// <returns>Sorted Wallpapers.</returns>
        public async Task <Collection <WallpapersResponse> > GetSortedWallpapersAsync(
            WallpaperAbyssSort sort,
            WallpaperAbyssInfoLevel infoLevel = WallpaperAbyssInfoLevel.One,
            int?page   = null,
            int?width  = null,
            int?height = null,
            WallpaperAbyssOperator @operator  = WallpaperAbyssOperator.equal,
            WallpaperAbyssCheckLast checkLast = WallpaperAbyssCheckLast.Zero
            )
        {
            var arguments = new WallpaperAbyssArgumentsBuilder()
            {
                Auth      = _auth,
                InfoLevel = infoLevel,
                Page      = page,
                Width     = width,
                Height    = height,
                Operator  = @operator,
                CheckLast = checkLast
            };

            switch (sort)
            {
            case WallpaperAbyssSort.newest:
                arguments.Method = WallpaperAbyssMethod.newest;
                break;

            case WallpaperAbyssSort.rating:
                arguments.Method = WallpaperAbyssMethod.highest_rated;
                break;

            case WallpaperAbyssSort.views:
                arguments.Method = WallpaperAbyssMethod.by_views;
                break;

            case WallpaperAbyssSort.favorites:
                arguments.Method = WallpaperAbyssMethod.by_favorites;
                break;
            }

            var result = await GeneralSearchAsync(arguments);

            return(result.ResponseObject.Wallpapers);
        }
 /// <summary>
 /// This method returns recently popular Wallpapers.
 /// </summary>
 /// <param name="infoLevel">The quantity of info returned for each wallpaper.</param>
 /// <param name="page">Page number, there are 30 wallpapers per page.</param>
 /// <param name="width">Get only wallpapers width specific width.</param>
 /// <param name="heigt">Get only wallpapers width specific height.</param>
 /// <param name="operator">The type of resolution filter, <= will be used with 'max', = with 'equal' and >= with 'min'.</param>
 /// <param name="checkLast">You can request an additional output letting you know if this is the last page of results for this set of parameters.</param>
 /// <returns>Wallpapers collection.</returns>
 public async Task <Collection <WallpapersResponse> > GetPopularWallpapers(
     WallpaperAbyssInfoLevel infoLevel = WallpaperAbyssInfoLevel.One,
     int?page  = null,
     int?width = null,
     int?heigt = null,
     WallpaperAbyssOperator @operator  = WallpaperAbyssOperator.equal,
     WallpaperAbyssCheckLast checkLast = WallpaperAbyssCheckLast.Zero
     )
 {
     return(await GetWallpapersBy(
                WallpaperAbyssMethod.popular,
                null,
                infoLevel,
                page,
                width,
                heigt,
                @operator,
                checkLast
                ));
 }
 /// <summary>
 /// This method returns featured Wallpapers.
 /// </summary>
 /// <param name="infoLevel">The quantity of info returned for each wallpaper.</param>
 /// <param name="sort">How are the wallpapers sorted.</param>
 /// <param name="page">Page number, there are 30 wallpapers per page.</param>
 /// <param name="width">Get only wallpapers width specific width.</param>
 /// <param name="heigt">Get only wallpapers width specific height.</param>
 /// <param name="operator">The type of resolution filter, <= will be used with 'max', = with 'equal' and >= with 'min'.</param>
 /// <param name="checkLast">You can request an additional output letting you know if this is the last page of results for this set of parameters.</param>
 /// <returns>Wallpapers collection.</returns>
 public async Task <Collection <WallpapersResponse> > GetFeaturedWallpapers(
     WallpaperAbyssSort sort           = WallpaperAbyssSort.newest,
     WallpaperAbyssInfoLevel infoLevel = WallpaperAbyssInfoLevel.One,
     int?page  = null,
     int?width = null,
     int?heigt = null,
     WallpaperAbyssOperator @operator  = WallpaperAbyssOperator.equal,
     WallpaperAbyssCheckLast checkLast = WallpaperAbyssCheckLast.Zero
     )
 {
     return(await GetWallpapersBy(
                WallpaperAbyssMethod.featured,
                null,
                infoLevel,
                sort,
                page,
                width,
                heigt,
                @operator,
                checkLast
                ));
 }