API Documentation

DruxtClient

druxt

Modules

DruxtClient : class

The JSON:API client used by the Druxt Nuxt plugin and DruxtStore.

DruxtNuxtModule : function

The Druxt module for Nuxt.

DruxtStore : object

Vuex module used to interface with the DruxtClient and store resource data.

DruxtClient : class

The JSON:API client used by the Druxt Nuxt plugin and DruxtStore.

See: DruxtClient
Example (Creating a new instance of the DruxtClient)

import { DruxtClient } from 'druxt'
const druxt = new DruxtClient('https://demo-api.druxtjs.org')

DruxtNuxtModule : function

The Druxt module for Nuxt.

See: DruxtNuxtModule
Example (Installing the Druxt module)

// nuxt.config.js
export default {
  modules: ['druxt'],
  druxt: {
    baseUrl: 'https://demo-api.druxtjs.org'
  }
}

DruxtStore : object

Vuex module used to interface with the DruxtClient and store resource data.

See: DruxtStore
Example (Manual usage)

import { DruxtStore } from 'druxt'
import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
const store = new Vuex.Store()
DruxtStore({ store })