0.0.9 • Published 10 months ago

contentful-wrapper v0.0.9

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months ago

Contentful Wrapper

Configuration

To fetch data from Contentful, use in the .env file

CONTENTFUL_SPACE_ID=
CONTENTFUL_ACCESS_TOKEN=

To run the test and dump the data, use in the .env file

MONGO_CONNECTION_STRING=

Setup

Ensure to set the contentful spaceID and AccessToken

const Contentful = require('contentful-sync');
const contentfulObj = new Contentful();

Methods

You can pull the following details from Contentful

  • Assets
  • Published Entries
    • model3d
    • simulations
    • studyGuide
    • subjects
    • tag
    • topic

To get all Assets,

const processEntries = true
contentfulObj.getAssets(processEntries)

processEntries will strip away the sys notation by Contentful

To get all entities,

const processEntries = true
const type = 'model3d'
contentfulObj.getAllPublishedEntriesOfType(type, processEntries)

processEntries will strip away the sys notation by Contentful type can be any one of model3d, simulations, studyGuide, subjects, tag, topic

0.0.9

10 months ago

0.0.8

10 months ago

0.0.7

10 months ago

0.0.6

1 year ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago