contentful-collection
v0.0.4
Published
[](https://npmjs.org/package/contentful-collection) [](https://npmjs.org/package/contentful-collection) [![License]
Downloads
110,124
Readme
(get) Contentful Collection
Get all pages of any contentful collection
Install
yarn
yarn add contentful-collection
npm
npm i contentful-collection
Usage
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)