A vue plugin for apiz
$ npm i -P @lowb/apiz-vue
import APIs from '@lowb/apiz-vue';
import Vue from 'vue';
Vue.use(APIs);
const apis = new APIs({
meta: {
getBooks: {
path: '/book'
}
},
retry: 1,
beforeSend() {},
afterResponse() {}
});
new Vue({
apis
});
// or
new Vue({
apis: {
name: '$http',
apiGroup: apis
}
});
// or
new Vue({
apis: [{
name: '$group0',
apiGroup: apis
}, {
name: '$group1',
apiGroup: apis
}]
});
meta
meta of APIz- All other option of apiz-ng are supported
- All options of apiz-browser-client are supported