0.0.5 • Published 2 years ago

@dokoo/vue v0.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Dokoo Vue Plugin

Installation

yarn add @dokoo/vue

Configure the plugin in your main.js:

import Vue from 'vue'
import Dokoo from '@dokoo/vue'

Vue.use(Dokoo({
  clients: {
    default: {
      token: '<your-auth-token>'
    }
  }
}))

Usage

You are ready to go! Use it in any of your component:

export default {
  data () {
    return {
      hits: []
    }
  },
  async fetch () {
    const feed = this.$dokoo.default.feeds.getFeed('<your-feed-id>')
    const { hits } = await feed.get()
    this.hits = hits
  }    
}

Read more documentation on the Javascript Dokoo Client: