let resultPageSize = results.pageSize; // 50
Returns the GroupsQueryBuilder
object used to get the current results.
Use the query
property to create and run a new query by chaining additional GroupsQueryBuilder functions to it.
let resultQuery = results.query;
Returns the total number of items that match the query.
The totalCount
returns the total number of items that match the query,
not just the number of items in the current page.
let resultCount = results.totalCount; // 150
let resultPages = results.totalPages; // 3
Retrieves the next page of query results.
The next()
function retrieves the next page of query results.
The page size is defined by the limit()
function, can be retrieved using the pageSize
property, and
navigating through pages is done with the prev()
and
next()
functions.
If items are added or removed between calls to next()
the values returned
by GroupsQueryResult
may change.
function next(): Promise<GroupsQueryResult>;
const nextPageResults = currentPageResults
.next()
.then((results) => {
return results;
})
.catch((error) => {
console.error(error);
});