Vue API Request
Vue API Request provides a full control on your APIs, making the calls simple, fast and easy to implement. Also, your code will be cleaner and more elegant.
Docs & Demo
Installation
Package is installable via NPM
$ npm i vue-api-request --save
or via Yarn
$ yarn add vue-api-request
or via CDN
It will set window.VueApiRequest
as the module.
Basic Usage
You have to import the library and use as a Vue plugin to enable the functionality globally on all components.
Vue
Example
My stuffs to be shown when the API loads
Pre Configuration
You may also set your own default configuration, so you don't need to customize every time each ApiRequest component. You are still able to customize a specific component using props.
Example
let options = effect: 'lightSpeedIn' resp: 'body.foo.bar' spinner: 'DotLoader' spinnerColor: 'blue' //or #0000ff spinnerPadding: '2em' spinnerScale: 14 { console } { } Vue
The 'options' variable above is equivalent of:
My stuffs to be shown when the API loads
Go to Demo & Docs to further informations.
Contributing
# clone projectgit clone https://github.com/ftgibran/vue-api-request.gitcd vue-api-request# install dependenciesnpm install# serve with hot reload at localhost:8080npm run dev# build for production with minificationnpm run build# build for production and view the bundle analyzer reportnpm run build --report# run unit testsnpm run unit# run e2e testsnpm run e2e# run all testsnpm test
For detailed explanation on how things work, checkout the guide and docs for vue-loader.
License
MIT Copyright (c) 2017 Felipe Gibran