Package Exports
- contentful-collection
- contentful-collection/dist/main.js
- contentful-collection/dist/module.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (contentful-collection) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
(get) Contentful Collection
Get all pages of any contentful collection
Install
yarn
yarn add contentful-collectionnpm
npm i contentful-collectionUsage
Query entries with contentful.js
import contentful from "contentful";
import getContentfulCollection from "contentful-collection";
const client = contentful.createClient({
space: "<space>",
accessToken: "<token>"
});
const query = {content_type: "<my-content-type>"};
const allItems = await getContentfulCollection(q => client.getEntries(q), query)