qwest-resource-factory

0.9.0 • Public • Published

qwest-resource-factory

Small library for better works with resources and qwest package

Installation

npm install --save qwest-resource-factory

Usages

resourceFactory = require "qwest-resource-factory"

UsersResource = resourceFactory "http://api.example.com/v1/users/:id:", 
    create:
        method: "post"
    update:
        method: "put"
        params:
            id: 1

UserResource.create(name: "Foo").then () ->
    console.log "Ok"
.catch () ->
    console.log "Err"

/qwest-resource-factory/

    Package Sidebar

    Install

    npm i qwest-resource-factory

    Weekly Downloads

    0

    Version

    0.9.0

    License

    MIT

    Last publish

    Collaborators

    • budry