vue-contentful-api

1.0.6 • Public • Published

vue-contentful-api

A small wrapper for integrating contentful to Vuejs

How to install:

npm install --save contentful vue-contentful-api

And in your entry file:

import * as Contentful from 'contentful'
import VueContentfulApi from 'vue-contentful-api'

let contentful = Contentful.createClient({
    space: 'SPACE-ID',
    accessToken: 'ACCESS-TOKEN',
})

Vue.use(VueContentfulApi, contentful)

Usage:

This wrapper bind contentful to Vue or this if you're using single file component.

You can use contentful like this:

Vue.contentful.getEntries().then((response) => {
  console.log(response)
})

this.contentful.getEntries().then((response) => {
  console.log(response)
})

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i vue-contentful-api

      Weekly Downloads

      2

      Version

      1.0.6

      License

      ISC

      Unpacked Size

      2.79 kB

      Total Files

      5

      Last publish

      Collaborators

      • sebastian.haede