Parameters
Returns
ArticleListBuilder (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 articles
openbridge.articles.list().after(cursor)
| Param | Type | Required | Description |
|---|---|---|---|
cursor | string | Yes | Cursor from previous pageInfo |
ArticleListBuilder (chainable)
// Get first page
const page1 = await openbridge.articles.list().limit(10)
// Get next page
if (page1.pageInfo.hasNextPage && page1.pageInfo.endCursor) {
const page2 = await openbridge.articles
.list()
.limit(10)
.after(page1.pageInfo.endCursor)
}
let cursor = null
const allArticles = []
async function loadMore() {
let query = openbridge.articles.list().limit(10)
if (cursor) {
query = query.after(cursor)
}
const { items, pageInfo } = await query
allArticles.push(...items)
cursor = pageInfo.endCursor
return pageInfo.hasNextPage
}