1.0.3 • Published 7 years ago

vue-service v1.0.3

Weekly downloads
105
License
MIT
Repository
github
Last release
7 years ago

vue-service

vue-resource wrapper class

Usage

you will need to create a service class like this:

// someService.js
import Service from 'vue-service'

const apiUrl = 'http://some.stuff/api/';

export default someService extends Service {
    
    construct(){
        super(apiUrl)
    }

    getAll(){
        return this.get('someEndPoint');
    }

    getOne(id) {
        return this.get('someEndPoint/'+ id);
    }
}

then you can import it an use it in what component you like

TODO

  • Create a Service Pool Vue Plugin, in order to call Services by name within the component
1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago