JSPM

contentful-collection

0.0.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 45447
  • Score
    100M100P100Q187929F
  • License MIT

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

Version Downloads/week License TypeScript

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)