@@ -1444,10 +1444,12 @@ get_content_packages <- function(content) {
14441444# ' @param include Comma-separated character string of values indicating additional
14451445# ' details to include in the response. Values can be `owner` and `vanity_url`;
14461446# ' both are included by default.
1447- # ' @param ... Extra arguments. Passing in `page_number` and `page_size` will
1448- # ' affect the internal pagination for Connect's content search API. Setting
1449- # ' `page_number` will change the page at which pagination *starts*, and
1450- # ' `page_size` will control the size of pages (max 500).
1447+ # ' @param page_size The number of items to fetch per page. Maximum is 500.
1448+ # ' @param limit Maximum number of items to return overall. Defaults to `Inf` (all items).
1449+ # ' @param ... Additional query parameters passed to the API for future expansion.
1450+ # ' Note: If you pass `page_number` here, it will affect the *starting* page
1451+ # ' for pagination, but all subsequent pages will still be fetched. This is
1452+ # ' usually not what you want.
14511453# '
14521454# ' @return
14531455# ' A list containing sub-fields:
@@ -1585,6 +1587,8 @@ search_content <- function(
15851587 client ,
15861588 q = NULL ,
15871589 include = " owner,vanity_url" ,
1590+ page_size = 500 ,
1591+ limit = Inf ,
15881592 ...
15891593) {
15901594 error_if_less_than(client $ version , " 2024.04.0" )
@@ -1595,28 +1599,29 @@ search_content <- function(
15951599 client ,
15961600 q = q ,
15971601 include = include ,
1598- # page_size and page_number can be passed in via `...`. Since this call is
1599- # still passed to page_offset, page_number affects the *starting* page,
1600- # but pagination still continues.
1602+ page_size = page_size ,
16011603 ...
1602- )
1604+ ),
1605+ limit = limit
16031606 )
16041607}
16051608
16061609.search_content <- function (
16071610 client ,
16081611 q ,
1612+ include ,
16091613 page_number = 1 ,
16101614 page_size = 500 ,
1611- include
1615+ ...
16121616) {
16131617 path <- v1_url(" search" , " content" )
16141618
16151619 query <- list (
16161620 q = q ,
16171621 page_number = page_number ,
16181622 page_size = page_size ,
1619- include = include
1623+ include = include ,
1624+ ...
16201625 )
16211626
16221627 client $ GET(path , query = query )
0 commit comments