node-rsr

1.4.1 • Public • Published

💫 RSR

This is simple Node HTTP resource.

License: MIT

Requirements

Installation

You can get it on npm.

npm install node-rsr --save

Or if you`re not into package management, just download a ZIP file.

Usage

static save(data) {
  return Rsr.save(Model, {
    data: data,
    error: 'Custom error message (optional)',
    validate: 'Custom validate message (optional)'
  });
}

static update(params, data) {
  return Rsr.update(Model, {
    params: params,
    data: data,
    error: 'Custom error message (optional)',
    validate: 'Custom validate message (optional)'
  });
}

static delete(params) {
  return Rsr.delete(Model, {
    params: params,
    error: 'Custom error message (optional)',
    validate: 'Custom validate message (optional)'
  });
}

static findAll(params) {
  return Rsr.findAll(Model, {
    params: params,
    error: 'Custom error message (optional)'
  });
}

static findOne(params) {
  return Rsr.findOne(Model, {
    params: params,
    error: 'Custom error message (optional)'
  });
}

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Changelog

This project adheres to Semantic Versioning. Every release, along with the migration instructions, is documented on the Github Releases page.

Author

Helder Burato

License

MIT License © Helder Burato

Dependents (0)

Package Sidebar

Install

npm i node-rsr

Weekly Downloads

1

Version

1.4.1

License

MIT

Unpacked Size

8.6 kB

Total Files

6

Last publish

Collaborators

  • helderburato
  • helderberto