Parameters
Returns
PageListBuilder (chainable)
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Paginate forward through pages
openbridge.pages.list().after(cursor)
| Param | Type | Required | Description |
|---|---|---|---|
cursor | string | Yes | Cursor from previous pageInfo |
PageListBuilder (chainable)
// Get first page
const page1 = await openbridge.pages.list().limit(10)
// Get next page
if (page1.pageInfo.hasNextPage && page1.pageInfo.endCursor) {
const page2 = await openbridge.pages
.list()
.limit(10)
.after(page1.pageInfo.endCursor)
}
let cursor = null
const allPages = []
async function loadMore() {
let query = openbridge.pages.list().limit(10)
if (cursor) {
query = query.after(cursor)
}
const { items, pageInfo } = await query
allPages.push(...items)
cursor = pageInfo.endCursor
return pageInfo.hasNextPage
}