예제 #1
0
        /// <summary>
        /// Get the next page of data given the current paginated response.
        /// </summary>
        /// <param name="currentPage">The current paged response.</param>
        /// <returns>The next page of data.</returns>
        public Task <PagedResponse <T> > GetNextPageAsync <T>(PagedResponse <T> currentPage, CancellationToken cancellationToken = default)
        {
            if (!currentPage.HasNextPage())
            {
                throw new NullReferenceException("No next page.");
            }

            return(GetPageAsync <T>(currentPage.Pagination.NextUri, cancellationToken));
        }