ronda-utils
Utils for ronda app
Last updated a year ago by pablohpsilva .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ronda-utils 
SYNC missed versions from official npm registry.

How to use

import resources from 'ronda-utils'

const baseURL = 'https://google.com'
const actions = {
  test: { method: 'GET', url: '/' }
}
const googleResource = resource(baseURL, actions)

googleResource.test()
  .then(res => console.log(res.log))

Default resources

const baseURL = 'https://google.com'
const googleResource = resource(baseURL)

googleResource.get()
  .then(res => console.log(res.log))

googleResource.save({ name: 'oi' })
  .then(res => console.log(res.log))

googleResource.query({ id: 1 })
  .then(res => console.log(res.log))

googleResource.update({ id: 1, name: 'hi' })
  .then(res => console.log(res.log))

googleResource.remove({ id: 1 })
  .then(res => console.log(res.log))

googleResource.delete({ id: 1 })
  .then(res => console.log(res.log))

Current Tags

  • 0.0.16                                ...           latest (a year ago)

7 Versions

  • 0.0.16                                ...           a year ago
  • 0.0.15                                ...           a year ago
  • 0.0.14                                ...           a year ago
  • 0.0.4                                ...           a year ago
  • 0.0.3                                ...           a year ago
  • 0.0.2                                ...           a year ago
  • 0.0.1                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 7
Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |