Skip to content

Commit

Permalink
Add experimental badge to pagination functions (#333)
Browse files Browse the repository at this point in the history
Fixes #322
  • Loading branch information
hadley authored Oct 9, 2023
1 parent 78bb8b4 commit 997911a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
12 changes: 12 additions & 0 deletions R/paginate.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#' Pagination
#'
#' @description
#' `r lifecycle::badge("experimental")`
#'
#' Use `req_paginate()` to specify how to request the next page in a paginated
#' API. Use [paginate_req_perform()] to fetch all pages.
#' If you need more control use a combination of [req_perform()] and
#' [paginate_next_request()] to iterate through the pages yourself.
#'
#' There are also helpers for common pagination patterns:
#' * `req_paginate_next_url()` when the response contains a link to the next
#' page.
Expand Down Expand Up @@ -108,6 +112,14 @@ req_paginate <- function(req,

#' Perform a paginated request
#'
#' @description
#' `r lifecycle::badge("experimental")`
#'
#' * `paginate_req_perform()` requests all pages for a paginated request and
#' returns a list of responses.
#' * `paginate_next_request()` generates the request for the next page for a
#' paginated response, or `NULL` if there are no more pages to return.
#'
#' @inheritParams req_perform
#' @param parsed The response parsed by the argument `parse_resp` of [req_paginate()].
#' @param max_pages The maximum number of pages to request.
Expand Down
8 changes: 7 additions & 1 deletion man/paginate_req_perform.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/req_paginate.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 997911a

Please sign in to comment.