contentful-offline-deliverydeprecated

Contentful Delivery API for exported json

Usage no npm install needed!

<script type="module">
  import contentfulOfflineDelivery from 'https://cdn.skypack.dev/contentful-offline-delivery';
</script>

README

contentful-offline-delivery

This library allows very basic usage of the Content Delivery API — running offline, and powered by a contentful-export.

To use, first export your content using contentful-export.

Current state of Content Delivery API: Only getEntries and getEntry methods are implemented. 🦀


yarn add contentful-offline-delivery

const contentful = require('contentful-offline-delivery')
const contentfulExport = require('./contentful-export.json')

contentful.import(contentfulExport)

// Use like existing Content Delivery API
contentful.getEntries({
  content_type: 'books',
  'fields.category': 'philosophy',
  locale: 'en-US' // default,
  include: 3,
  skip: 12,
  limit: 5
}).then(response => {
  console.log(response)
})