Skip to content

geodir/builder-api

Repository files navigation

builder-api

Cliente de Builder - API A deadly simple Vue.js plugin to consume GeodirBuilder API.

Using it

Install and import

npm install --save @geodir/builder-api

In your main application JS file (typically main.js if you are using vue-cli webpack template), simply use the plugin:

// vue-resource is needed too
import VueResource from 'vue-resource'
Vue.use(VueResource)

// import GeodirBuilderApi
import GeodirBuilderApi from '@geodir/builder-api'
Vue.use(GeodirBuilderApi, { token: 'user Personal Access Token' })

You can configure application wide options while Vue.use'ing this plugin:

Name Description
token one of your Geodir Builder API user Personal Access Token to connect to the API

Consume Geodir Builder API

You can also use it in your .vue components with this.$geodirBuilderApi:

this.$geodirBuilderApi.builderTeams([this.myGeodirBuilderData, 'teams'])

Geodir Builder Api