@dewib/dw-api

2.7.0 • Public • Published

dw-ui

Dewib api wrap all your request into one place and map your response for your needs.

Install

Add package yarn add @dewib/dw-api

Usage

Add your main service into ./dewib/api folder

import UserService from './user/index'

export default {
  UserService
}

Then your service should look like

import { Model } from '@dewib/dw-api/utils'
/**
 *
 *
 * @export
 * @class UserService
 * @extends {Model}
 */
export default class UserService extends Model {
  /**
   * Create user
   * @param {*} user
   * @returns {Promise<*>} User model
   */
  store (user, params) {
    return this.$http...
  }
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.7.034latest

Version History

VersionDownloads (Last 7 Days)Published
2.7.034
2.6.20
2.6.10
2.6.00
2.5.00
2.4.00
2.3.00
2.2.00
2.1.00
2.0.10
2.0.00
1.1.00

Package Sidebar

Install

npm i @dewib/dw-api

Weekly Downloads

34

Version

2.7.0

License

MIT

Unpacked Size

14.4 kB

Total Files

11

Last publish

Collaborators

  • dewib