lib/jamf/api/mixins/pageable.rb
def fetch_collection_page(rsrc, page, page_size, sort, filter, cnx: Jamf.cnx)
      page_size ||= DFT_PAGE_SIZE
      validate_page_params page_size, page
      raw = cnx.get "#{rsrc}?page=#{page}&page-size=#{page_size}#{sort}#{filter}"

      raw[:results]
    end
# Get a specific page of a paged collection request,
# possibly sorted & filtered.
#
# @param rsrc [String] The collection resource GET endpoint
#
# @param page [Integer] which page to get
#
# @param page_size [Integer] how many items per page
#
# @param sort [String,Array<String>] server-side sorting parameters
#
# @param filter [String] RSQL String limiting the result set
#
# @param cnx [Jamf::Connection] The API connection to use
#
# @return [Array<Object>] The parsed JSON for the requested page
#
Get a specific page of a paged collection request,
possibly sorted & filtered.
Get a specific page of a paged collection request possibly sorted & filtered .
def fetch_collection_page(rsrc, page, page_size, sort, filter, cnx: Jamf.cnx)
      page_size ||= DFT_PAGE_SIZE
      validate_page_params page_size, page
      raw = cnx.get "#{rsrc}?page=#{page}&page-size=#{page_size}#{sort}#{filter}"
      raw[:results]
    end
def fetch_collection_page ( rsrc , page , page_size , sort , filter , cnx : Jamf . cnx ) page_size ||= DFT_PAGE_SIZE validate_page_params page_size , page raw = cnx . get "#{rsrc}?page=#{page}&page-size=#{page_size}#{sort}#{filter}" raw [ :results ] end
Get a specific page of a paged collection request,
possibly sorted & filtered.
Get a specific page of a paged collection request possibly sorted & filtered .
The parsed JSON for the requested page
The parsed JSON for the requested page
Array<Object>
rsrc
The collection resource GET endpoint
The collection resource GET endpoint
page
which page to get
which page to get
page_size
None
sort
server-side sorting parameters
server - side sorting parameters
filter
RSQL String limiting the result set
RSQL String limiting the result set
cnx
The API connection to use
The API connection to use