Chainable Methods
Returns
CollectionsResult
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Fetch multiple collections
openbridge.collections.list()
openbridge.collections.list().limit(10).select(['title', 'handle'])
| Method | Description |
|---|---|
.limit(count) | Limit number of results (default: 250) |
.after(cursor) | Fetch results after cursor (pagination) |
.before(cursor) | Fetch results before cursor (pagination) |
.search(query) | Filter by search query |
.select(fields) | Limit returned fields |
CollectionsResult
{
items: ShopifyCollection[]
pageInfo: ShopifyPageInfo
}
const { items, pageInfo } = await openbridge.collections.list()
const { items } = await openbridge.collections
.list()
.limit(10)
const { items, pageInfo } = await openbridge.collections
.list()
.search('summer')
.limit(10)
.select(['title', 'handle', 'image'])
const page1 = await openbridge.collections.list().limit(10)
if (page1.pageInfo.hasNextPage && page1.pageInfo.endCursor) {
const page2 = await openbridge.collections
.list()
.limit(10)
.after(page1.pageInfo.endCursor)
}